Pylint 忽略模式不起作用 [英] Pylint ignore-patterns Not Working
本文介绍了Pylint 忽略模式不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我使用的 rc 文件具有:
I'm using an rc file that has:
ignore-patterns=".*local.*"
我希望这会忽略名称中带有 local
字样的所有文件.因此,tmplocal.py
、tmp.local.py
、tmp_local.py
、local_tmp.py
等.
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.
在运行 Pylint (1.7.2) 时,这些文件不会被忽略.有什么建议吗?
When running Pylint (1.7.2), these files are not ignored. Any suggestions?
推荐答案
最终对我有用的是不包括引号.我当前的配置看起来像这样:ignore-patterns=one.py,.*local.*
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]
这篇关于Pylint 忽略模式不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文