我們已經制定了這樣一個Python項目:pylint的:禁用特定的警告針對特定文件夾
project/
├── .pylintrc
├── module1.py
├── module2.py
└── tests/
├── test_module1.py
└── test_module2.py
我們的單元測試和功能測試駐留稱爲tests/
的文件夾中。說到測試,pylint警告missing-docstring
,invalid-name
和protected-access
是不相關的。另一方面,這些警告對於項目中的實際代碼非常有用。
我的問題是,是否有可能在應用到模塊中tests/
-folder 僅的.pylintrc
-file添加忽略了missing-docstring
,invalid-name
和protected-access
?
如果可能,我們不希望將#
這些警告的禁用添加到文件夾內的每個測試模塊。
另請參閱[此答案](https://stackoverflow.com/a/47584560/4201810) – georgexsh