Python v3.6, Django v2.0을 사용하고 있으며 pylint_django에 문제가 있습니다.pylint_django 예외 발생
먼저 "pylint polls /"를 실행하여 폴더에서 실행하면 폴더에서 모든 파일에 대한 모든 코드 문제가 표시됩니다. django 프레임 워크로 인해 잘못 표시되는 linting 오류가 많이 있습니다. pylint_django 플러그인을 사용하면 이러한 문제를 해결할 수 있다고 알려졌습니다.
나는 "pylint_django를 설치 PIP"를 사용하여 플러그인을 설치 한, 그러나 나는 시도하고 실행 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 문제] (https://github.com/landscapeio/pylint-django/issues/108) –