reddit / emacs

Django and Flycheck?

GidiomGates ยท 2022-10-24 14:29
I've been working with Django, using Flycheck and Company-mode for check and autocompletion. Well, Flycheck have been showing errors with objects member in classes, but this is a False positive, even company sugest to me the correct completion but Flycheck mark this like error. I have searched in web, and found that Flycheck is using wrong dir, but i don't know how customize that. Is there some option to Flycheck work well on Django? pylint has an module named pylint-django. Can be this enhabled in Flycheck? Edit: I found solution that works to me for now, but isn't automatic. 1) Install pylint-django pluging with pip `pip install pylint-django` 2) Create a pylint config file in the root directory of project. You can do thi from terminal `pylint --generate-rcfile > .pylintrc` 3)Enhable Django pluging in pylint config file in "load-plugins" line `load-plugins=pylint_django` That worked to me. When you start flychek in current buffer, you can see if flycheck is using the config file: `M-x flycheck-verify-setup`