私はPython v3.6、Django v2.0を使用していますが、pylint_djangoに問題があります。pylint_django throwing exception
まず、 "pylint polls /"を実行してフォルダを実行すると、フォルダ内のすべてのファイルのすべてのコードの問題が表示されます。 djangoのフレームワークのせいで誤って表示されているlintingエラーがたくさんあります。pylint_djangoプラグインを使用するとこれらを取り除くことができます。
私は「pylint_djangoをインストールピップ」を使用してプラグインをインストールしているが、私は試してみて、このプラグインを使用してpylintを実行すると、そのエラー:
C:\Users\Michael\Dev\DjangoProject>pylint --load-plugins pylint_django polls/
Traceback (most recent call last):
File "c:\users\michael\appdata\local\programs\python\python36-32\Lib\runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "c:\users\michael\appdata\local\programs\python\python36-32\Lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "C:\Users\Michael\Envs\Django\Scripts\pylint.exe\__main__.py", line 9, in <module>
File "c:\users\michael\envs\django\lib\site-packages\pylint\__init__.py", line 16, in run_pylint
Run(sys.argv[1:])
File "c:\users\michael\envs\django\lib\site-packages\pylint\lint.py", line 1268, in __init__
linter.load_plugin_modules(self._plugins)
File "c:\users\michael\envs\django\lib\site-packages\pylint\lint.py", line 495, in load_plugin_modules
module.register(self)
File "c:\users\michael\envs\django\lib\site-packages\pylint_django\plugin.py", line 22, in register
start = name_checker.config.const_rgx.pattern[:-2]
AttributeError: 'NoneType' object has no attribute 'pattern'
誰もが私が間違っているかもしれないものを知っていますか?
おかげ
[GitHub issue](https://github.com/landscapeio/pylint-django/issues/108) –