A Python formatter that uses yapf and autoflake to format python files, but with properly sorted import statements.
pip install fmp
usage: fmp [-h] [-s {pep8,google,yapf,facebook}] [-i] [-o] [-n] [-k] [-K]
files [files ...]
positional arguments:
files Files to format
options:
-h, --help show this help message and exit
-s {pep8,google,yapf,facebook}, --style {pep8,google,yapf,facebook}
Formatting style
-i, --in-place Make changes in-place
-o, --only-imports Only return sorted import statements
-n, --show-line-numbers
Render a column for line numbers
-k, --keep-unused-imports
Keep the import statement of all unused modules
-K, --keep-external-unused-imports
Keep the import statement of external unused modules