Pylint ignore-patterns Not Working

我与影子孤独终老i 提交于 2021-02-08 19:41:25

问题


I'm using an rc file that has:

ignore-patterns=".*local.*"

I expect this to ignore all files with the word local in the name. So, tmplocal.py, tmp.local.py, tmp_local.py, local_tmp.py, etc.

When running Pylint (1.7.2), these files are not ignored. Any suggestions?


回答1:


What ended up working for me was not including quotes. My current config looks something like this: ignore-patterns=one.py,.*local.*

$ pylint --version
pylint 1.7.2, 
astroid 1.5.3
Python 3.5.2 (default, Nov 23 2017, 16:37:01) 
[GCC 5.4.0 20160609]



回答2:


Seems from my tests that ignore-patterns is only working in CLI. Try with:

pylint --ignore-patterns ...


来源:https://stackoverflow.com/questions/45870233/pylint-ignore-patterns-not-working

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!