python - 如何从 Pylint 中排除南移?

标签 python django django-south pylint

我在我的 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/

相关文章:

django - View 中的多个过滤器参数

django - contenttypes.contenttype 在此迁移中不可用

django - 使用 Django South 重置迁移历史记录的推荐方法是什么?

django - 如何通过南迁移在现有模型中添加一对一的关系字段

python - 如何在 python numpy 中并行化求和计算?

python - 使用python-rsa加密消息时出现溢出异常

python - 如何在 Google App Engine 上对 Django View 进行单元测试?

python - 在 Python 中矢量化多元正态 CDF(累积密度函数)

django - 在Django中使用ForeignKey有什么优点?

python - Django 按预订日期过滤外键