Pyink – Python code formatter

Pyink is a Python code formatter designed as a fork of Black with a small set of different formatting behaviours intended to ease adoption in environments where switching directly to Black would be too disruptive.

The project keeps Black compatibility in mind while adding its own options and behaviour changes, such as configurable indentation, quote-style inference, and support for formatting selected line ranges.

This is free and open source software.

Key Features

  • Formats Python code from the command line using a workflow similar to Black.
  • Supports two-space or four-space indentation with the pyink-indentation option.
  • Can infer the preferred quote style in a file with the pyink-use-majority-quotes option.
  • Supports formatting only selected line ranges with the --pyink-lines argument.
  • Uses a [tool.pyink] section in pyproject.toml for configuration.
  • Works with the pre-commit framework.
  • Maintains a Black-compatible foundation while applying a few distinct formatting rules.

Website: github.com/google/pyink
Support:
Developer: Google
License: MIT License

Pyink is written in Python. Learn Python with our recommended free books and free tutorials.


Best Free and Open Source Software Explore our comprehensive directory of recommended free and open source software. Our carefully curated collection spans every major software category.

This directory is part of our ongoing series of informative articles for Linux enthusiasts. It features hundreds of detailed reviews, along with open source alternatives to proprietary solutions from major corporations such as Google, Microsoft, Apple, Adobe, IBM, Cisco, Oracle, and Autodesk.

You’ll also find interesting projects to try, hardware coverage, free programming books and tutorials, and much more.

Discovered a useful open source Linux program that we haven’t covered yet? Let us know by completing this form.
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted