.TH autoflake "1" Manual .SH NAME autoflake \- removes unused imports and unused variables in Python code .SH SYNOPSIS .B autoflake [-h] [-c | -cd] [--imports IMPORTS | --remove-all-unused-imports] [-r] [-j n] [--exclude globs] [--expand-star-imports] [--ignore-init-module-imports] [--remove-duplicate-keys] [--remove-unused-variables] [--remove-rhs-for-unused-variables] [--ignore-pass-statements] [--ignore-pass-after-docstring] [--version] [--quiet] [-v] [--stdin-display-name STDIN_DISPLAY_NAME] [--config CONFIG_FILE] [-i | -s] files [files ...] .SH DESCRIPTION Removes unused imports and unused variables as reported by pyflakes. .SH OPTIONS .TP \fBfiles\fR files to format .TP \fB\-c\fR, \fB\-\-check\fR return error code if changes are needed .TP \fB\-cd\fR, \fB\-\-check\-diff\fR return error code if changes are needed, also display file diffs .TP \fB\-\-imports\fR \fI\,IMPORTS\/\fR by default, only unused standard library imports are removed; specify a comma\- .br separated list of additional modules/packages .TP \fB\-\-remove\-all\-unused\-imports\fR remove all unused imports (not just those from the standard library) .TP \fB\-r\fR, \fB\-\-recursive\fR drill down directories recursively .TP \fB\-j\fR n, \fB\-\-jobs\fR n number of parallel jobs; match CPU count if value is 0 (default: 0) .TP \fB\-\-exclude\fR globs exclude file/directory names that match these comma\-separated globs .TP \fB\-\-expand\-star\-imports\fR expand wildcard star imports with undefined names; this only triggers if there .br is only one star import in the file; this is skipped if there are any uses of .br `__all__` or `del` in the file .TP \fB\-\-ignore\-init\-module\-imports\fR exclude __init__.py when removing unused imports .TP \fB\-\-remove\-duplicate\-keys\fR remove all duplicate keys in objects .TP \fB\-\-remove\-unused\-variables\fR remove unused variables .TP \fB\-\-remove\-rhs\-for\-unused\-variables\fR remove RHS of statements when removing unused variables (unsafe) .TP \fB\-\-ignore\-pass\-statements\fR ignore all pass statements .TP \fB\-\-ignore\-pass\-after\-docstring\fR ignore pass statements after a newline ending on '"""' .TP \fB\-\-version\fR show program's version number and exit .TP \fB\-\-quiet\fR Suppress output if there are no issues .TP \fB\-v\fR, \fB\-\-verbose\fR print more verbose logs (you can repeat `\-v` to make it more verbose) .TP \fB\-\-stdin\-display\-name\fR \fI\,STDIN_DISPLAY_NAME\/\fR the name used when processing input from stdin .TP \fB\-\-config\fR \fI\,CONFIG_FILE\/\fR Explicitly set the config file instead of auto determining based on file .br location .TP \fB\-i\fR, \fB\-\-in\-place\fR make changes to files instead of printing diffs .TP \fB\-s\fR, \fB\-\-stdout\fR print changed text to stdout. defaults to true when formatting stdin, or to .br false otherwise .SH AUTHORS .B autoflake was written by Steven Myint . .SH DISTRIBUTION The latest version of autoflake may be downloaded from .UR https://github.com/PyCQA/autoflake .UE