disable all flake8-doc-strings checks

2.5k views Asked by At

I'm using wemake-python-styleguide linter in a project. I have a project-scoped setup.cfg file that looks like this:

[flake8]
# Base flake8 configuration:
format = wemake
show-source = True
statistics = True
doctests = False

# Plugins:
min-name-length = 1
max-returns = 2
max-arguments = 4
max-complexity = 6
max-line-length = 80

# Self settings:
max-imports = 16

# Excluding some directories:
exclude =
  .git
  __pycache__
  .venv
  .eggs
  *.egg
  .idea

# Exclude some violation checks globally:
ignore =
    # WPS305: Found `f` string
    WPS305
    # WPS336 Found explicit string concat
    WPS336
    # Q000  Remove bad quotes -> ""
    Q000
    # WPS421 Found wrong function call
    WPS421

I'd like to disable all checks for doc strings. I know I can use error codes, but the list is long.

Is there a way to turn off a specific flake8 plugin, in my case, the flake8-docstrings plugin?

As far as I'm concenred there is no way to disable it inside the setup.cfg.

1

There are 1 answers

0
anthony sottile On BEST ANSWER

you can ignore all codes by using a prefix

you currently have an ignore = setting, you would add D (the code for flake8-docstrings) to that

I'd also suggest using extend-ignore over ignore since that will preserve the default set of ignored things (including some conflicting default rules (W504/W503))


disclaimer: I'm the current maintainer of flake8 and flake8-docstrings