我在我的 Django 项目中使用 South 进行迁移。当我在我的项目上运行 Pylint 时,我从迁移文件中得到了一堆错误。如何从 Pylint 中排除迁移文件?
我在 Windows 系统上,所以我不能在 Pylint 选项中使用文件名排除。我试图求助于将 # pylint: disable-msg-cat=WCREFI
添加到我的每个迁移文件的顶部。这看起来很笨拙,似乎是最后的手段,但这个记录的指令不起作用,我收到错误 [E] Unrecognized file option 'disable-msg-cat'
。
最佳答案
将以下内容添加到 .pylintrc
文件中即可。
[MASTER]
# Add <file or directory> to the black list. It should be a base name, not a
# path. You may set this option multiple times.
ignore=tests.py, urls.py, migrations
关于python - 如何从 Pylint 中排除南移?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7880180/