CmdID

CmdID / Commands

autoflake

Remove unused imports and variables from Python code. tldr-pages

On several platforms

Opens CmdID with your command. It is read in your browser and sent nowhere.

Several platforms

from tldr-pages, CC BY 4.0

Remove unused variables from a single file and display the diff

autoflake --remove-unused-variables path/to/file.pyIdentify

Remove unused imports from multiple files and display the diffs

autoflake --remove-all-unused-imports path/to/file1.py path/to/file2.py ...Identify

Remove unused variables from a file, overwriting the file

autoflake --remove-unused-variables --in-place path/to/file.pyIdentify

Remove unused variables recursively from all files in a directory, overwriting each file

autoflake --remove-unused-variables --in-place --recursive path/to/directoryIdentify