我在項目中使用wemake-python-styleguide linter。我有一個項目范圍的setup.cfg文件,如下所示:[flake8]# Base flake8 configuration:format = wemakeshow-source = Truestatistics = Truedoctests = False# Plugins:min-name-length = 1max-returns = 2max-arguments = 4max-complexity = 6max-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.
1 回答

一只名叫tom的貓
TA貢獻1906條經驗 獲得超3個贊
您可以使用前綴忽略所有代碼
您當前有一個ignore =
設置,您可以將D
( 的代碼flake8-docstrings
)添加到該設置中
我還建議使用extend-ignore
overignore
因為這將保留默認的被忽略的內容集(包括一些沖突的默認規則(W504/W503))
添加回答
舉報
0/150
提交
取消