我无法弄清楚运行pylint的语法。我需要它跳过所有django migrations
文件夹,但是当我像这样运行它时
pylint catalog --ignored-modules=migrations
我仍然会检查我的迁移:
************* Module catalog.migrations.0001_initial
C: 19, 0: Line too long (114/100) (line-too-long)
C: 1, 0: Invalid module name "0001_initial" (invalid-name)
C: 1, 0: Missing module docstring (missing-docstring)
C: 8, 0: Missing class docstring (missing-docstring)
************* Module catalog.migrations.0002_botstateviewtemplate
C: 18, 0: Line too long (114/100) (line-too-long)
C: 1, 0: Invalid module name "0002_botstateviewtemplate" (invalid-name)
C: 1, 0: Missing module docstring (missing-docstring)
C: 8, 0: Missing class docstring (missing-docstring)
************* Module catalog.migrations.0003_delete_botstateviewtemplate
C: 1, 0: Invalid module name "0003_delete_botstateviewtemplate" (invalid-name)
C: 1, 0: Missing module docstring (missing-docstring)
C: 8, 0: Missing class docstring (missing-docstring)
我缺少什么正确的语法?
尝试catalog.migrations
后更新:问题仍然存在
答案 0 :(得分:0)
我认为正确的方法是:pylint catalog --ignore=0001_initial.py
答案 1 :(得分:0)
--ignore=<file[,file…]>
Add files or directories to the blacklist. They should be base names, not paths.
所以正确的方法应该是:
pylint catalog --ignore=migrations