如何从Pylint中排除南迁移?

Mri*_*lla 11 python django pylint django-south

我在我的Django项目中使用South进行迁移.当我在我的项目上运行Pylint时,我从迁移文件中得到了一堆错误.如何从Pylint中排除迁移文件?

我在Windows系统上,所以我不能在Pylint选项中使用文件名排除.我试图添加# pylint: disable-msg-cat=WCREFI到每个迁移文件的顶部.它似乎非常kludgy,似乎是最后的手段,但这个记录的指令不起作用,我得到错误[E] Unrecognized file option 'disable-msg-cat'.

Mri*_*lla 18

将以下内容添加到.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
Run Code Online (Sandbox Code Playgroud)