github psf/black 25.11.0

7 hours ago

Highlights

  • Enable base 3.14 support (#4804)
  • Add support for the new Python 3.14 t-string syntax introduced by PEP 750 (#4805)

Stable style

  • Fix bug where comments between # fmt: off and # fmt: on were reformatted (#4811)
  • Comments containing fmt directives now preserve their exact formatting instead of
    being normalized (#4811)

Preview style

  • Move multiline_string_handling from --unstable to --preview (#4760)
  • Fix bug where module docstrings would be treated as normal strings if preceded by
    comments (#4764)
  • Fix bug where python 3.12 generics syntax split line happens weirdly (#4777)
  • Standardize type comments to form # type: <value> (#4645)
  • Fix fix_fmt_skip_in_one_liners preview feature to respect # fmt: skip for compound
    statements with semicolon-separated bodies (#4800)

Configuration

  • Add no_cache option to control caching behavior. (#4803)

Packaging

  • Releases now include arm64 Linux binaries (#4773)

Output

  • Write unchanged content to stdout when excluding formatting from stdin using pipes
    (#4610)

Blackd

  • Implemented BlackDClient. This simple python client allows to easily send formatting
    requests to blackd (#4774)

Integrations

  • Enable 3.14 base CI (#4804)
  • Enhance GitHub Action psf/black to support the required-version major-version-only
    "stability" format when using pyproject.toml (#4770)
  • Improve error message for vim plugin users. It now handles independently vim version
  • Vim: Warn on unsupported Vim and Python versions independently (#4772)
  • Vim: Print the import paths when importing black fails (#4675)
  • Vim: Fix handling of virtualenvs that have a different Python version (#4675)

Don't miss a new black release

NewReleases is sending notifications on new releases.