Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to highlight Python modules that are not used in Emacs

Something like 6 months ago, I met a developer who was using Emacs. We were writing Django code and thus Python. There is a feature he has enabled (wrote himself ?) which could highlight the imported modules that were not used.

I am willing to have this, unfortunately I didn't find anything related the past 15 minutes. So my guess is that he wrote it himself. I am far from the Lisp guru you guys could be, hence here I am, asking for directions about such a task ;].

like image 708
Mathieu Marques Avatar asked Dec 21 '22 02:12

Mathieu Marques


2 Answers

For automatic checking using imported modules you need install flycheck and python-mode, and later execute command flycheck-verify-setup.

flycheck-verify-setup (all installed and founded)

Later you must install python packages, for example, pep8, pylint, flake8 and other. Install him with pip on system side (recommended) or in your virtual environment.

Flycheck highlight unused imported module

like image 191
Dunaevsky Maxim Avatar answered Mar 03 '23 07:03

Dunaevsky Maxim


You can get automatic python syntax checking (including unused imports) by installing flycheck

like image 25
barracel Avatar answered Mar 03 '23 06:03

barracel