Awesome Python Code Formatters
A curated list of awesome Python code formatters
Code formatters
- 2to3 -- Automated Python 2 to 3 code translation.
- add-trailing-comma -- A tool to automatically add trailing commas to calls and literals.
- autoflake -- Removes unused imports and unused variables as reported by pyflakes.
- autopep8 -- A tool that automatically formats Python code to conform to the PEP 8 style guide.
- black -- The uncompromising Python code formatter.
- decrapify -- Some scripts that use pybowler.io for refactoring Python code.
- docformatter -- Formats docstrings to follow PEP 257.
- eradicate -- Removes commented-out code from Python files.
- isort -- A Python utility / library to sort imports.
- pyupgrade -- A tool to automatically upgrade syntax for newer versions of the language.
- unify -- Modifies strings to all use the same quote where possible.
- yapf -- Yet another Python code formatter from Google.
Improvements and wrappers
- black-macchiato -- paints part of your python code black.
- blacken-docs -- Run
blackon python code blocks in documentation files. - jupyterlab_code_formatter -- A universal code formatter for JupyterLab.
- pyformat -- wrapper around
autopep8,autoflake,docformatter, andunify.