regex - Pylint 忽略模式不起作用

标签 regex pylint

我正在使用具有以下内容的 rc 文件:
ignore-patterns=".*local.*"
我希望这会忽略所有带有 local 字样的文件在名字里。所以,tmplocal.py , tmp.local.py , tmp_local.py , local_tmp.py , 等等。

运行 Pylint (1.7.2) 时,不会忽略这些文件。有什么建议?

最佳答案

最终对我有用的不包括引号。我当前的配置看起来像这样: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]

关于regex - Pylint 忽略模式不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45870233/

相关文章:

sublimetext2 - 用于在 Sublime Text 中安装 Pylint 的 lint.py 文件在哪里

python - Pylint 不理解 if/else 语句?

正则表达式用于检测和替换具有重复捕获组的行,以删除 piprequirements.txt 文件中的重复包

javascript - <script> </script> block 中空格的规范化

python-3.x - 有没有办法指示 Pylint 哪些库应该被视为第 3 方?

linux - VIM 中 python 代码窗口关闭后自动关闭 pylint 窗口

python - 如何使用正则表达式匹配带边界的单词?

regex - Bash 正则表达式匹配 "0xffffffc0006e0584 is in some_function (/path/to/my/file.c:93)."

java - 为包含具有相同定界符的其他字符的字符串拆分带定界符的字符串

pylint - 什么是 pylint 退出代码 28?