corrafig / pyimport

Manage Python imports from Emacs!

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

pyimport

Manage Python imports from Emacs!

Build Status Coverage Status MELPA

Installation: install from MELPA, or add pyimport.el to your load-path.

Unused Imports

Requires pyflakes to be installed.

screenshot

Run M-x pyimport-remove-unused.

This requires pyflakes to be on PATH. Alternatively, set pyimport-pyflakes-path.

Insert Missing Imports

screenshot

Place point on the missing variable, then run M-x pyimport-insert-missing.

This assumes that you have another Python buffer that contains an example of importing the variable.

I like to bind this to a key:

(define-key python-mode-map (kbd "C-c C-i") #'pyimport-insert-missing)

About

Manage Python imports from Emacs!


Languages

Language:Emacs Lisp 100.0%