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: offand# fmt: onwere reformatted (#4811) - Comments containing fmt directives now preserve their exact formatting instead of
being normalized (#4811)
Preview style
- Move
multiline_string_handlingfrom--unstableto--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_linerspreview feature to respect# fmt: skipfor compound
statements with semicolon-separated bodies (#4800)
Configuration
- Add
no_cacheoption 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/blackto support therequired-versionmajor-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)