禁用所有 flake8-doc-strings 检查

disable all flake8-doc-strings checks

我在项目中使用 wemake-python-styleguide linter。我有一个项目范围的 setup.cfg 文件,如下所示:

[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

我想禁用 所有 文档字符串检查。我知道我可以使用错误代码,但是 list 很长。

有没有办法关闭特定的 flake8 插件,在我的例子中,flake8-docstrings 插件?

据我所知,无法在 setup.cfg.

中禁用它

您可以使用前缀忽略所有代码

您当前有一个 ignore = 设置,您可以将 Dflake8-docstrings 的代码)添加到

我还建议使用 extend-ignore 而不是 ignore,因为这将保留默认的一组忽略的事物(包括一些相互冲突的默认规则 (W504/W503))


免责声明:我是 flake8 和 flake8-docstrings 的当前维护者