Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/316.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 禁用所有flake8文档字符串检查_Python_Flake8 - Fatal编程技术网

Python 禁用所有flake8文档字符串检查

Python 禁用所有flake8文档字符串检查,python,flake8,Python,Flake8,我在一个项目中使用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-lengt

我在一个项目中使用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
我想禁用对文档字符串的所有检查。我知道我可以使用错误代码,但代码很长

有没有办法关闭一个特定的flake8插件,在我的例子中,就是flake8 docstrings插件


据我所知,在setup.cfg中无法禁用它。

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

如果您当前有一个ignore=设置,那么您将向该设置中添加flake8 docstring的代码

我还建议使用extend ignore over ignore,因为这将保留默认的忽略内容集,包括一些冲突的默认规则W504/W503


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

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

如果您当前有一个ignore=设置,那么您将向该设置中添加flake8 docstring的代码

我还建议使用extend ignore over ignore,因为这将保留默认的忽略内容集,包括一些冲突的默认规则W504/W503

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