Please test out the draft 2026 style in version 26.1a1! This style will be finalized in
the January release (26.1.0). Most of the changes in --preview will be in the 2026
stable style, but not all.
Please share your feedback!
This release (25.12.0) will still produce the 2025 style.
Highlights
- Black no longer supports running with Python 3.9 (#4842)
Stable style
- Fix bug where comments preceding
# fmt: off/# fmt: onblocks were incorrectly
removed, particularly affecting Jupytext's# %% [markdown]comments (#4845) - Fix crash when multiple
# fmt: skipcomments are used in a multi-part if-clause, on
string literals, or on dictionary entries with long lines (#4872) - Fix possible crash when
fmt:directives aren't on the top level (#4856)
Preview style
- Fix
fmt: skipskipping the line after instead of the line it's on (#4855) - Remove unnecessary parentheses from the left-hand side of assignments while preserving
magic trailing commas and intentional multiline formatting (#4865) - Fix
fix_fmt_skip_in_one_linerscrashing onwithstatements (#4853) - Fix
fix_fmt_skip_in_one_linerscrashing on annotated parameters (#4854) - Fix new lines being added after imports with
# fmt: skipon them (#4894)
Packaging
- Releases now include arm64 Windows binaries and wheels (#4814)
Integrations
- Add
output-fileinput to GitHub Actionpsf/blackto write formatter output to a
file for artifact capture and log cleanliness (#4824)