The Wayback Machine - https://web.archive.org/web/20200906235607/https://github.com/life4/awesome-python-code-formatters/
Skip to content
master
Go to file
Code

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
Aug 13, 2019

README.md

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.
  • com2ann -- Translates type comments to type annotations.
  • 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.
  • prettier -- An opinionated code formatter, not only for Python.
  • pybetter -- Tool for fixing trivial problems with your code.
  • pyupgrade -- A tool to automatically upgrade syntax for newer versions of the language.
  • reindent.py -- Change Python (.py) files to use 4-space indents and no hard tab characters.
  • star-destroyer -- Eliminates import * from your modules.
  • teyit -- Unittest assertion formatter.
  • 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 black on python code blocks in documentation files.
  • brunette -- best practice Python code formatter, wrapper around black with improvements.
  • gray -- wrapper around isort, pyupgrade, add-trailing-comma, and unify.
  • jupyterlab_code_formatter -- A universal code formatter for JupyterLab.
  • pyformat -- wrapper around autopep8, autoflake, docformatter, and unify.
  • shed -- wrapper around autoflake, black, com2ann, isort, pybetter, pyupgrade, and teyit; with fully automatic configuration and blacken-docs-inspired support for code in docs files too.

Libraries and refactoring

  • bowler -- Safe code refactoring for modern Python.
  • fissix -- backport of lib2to3, with enhancements.
  • massedit -- edit text files with Python.
  • rope -- a python refactoring library.
  • undebt -- tool for performing massive, automated Python code refactoring.
You can’t perform that action at this time.