Repository navigation
Update dependency black to v26 - #83
Open
renovate[bot] wants to merge 1 commit into
Open
renovate[bot] wants to merge 1 commit into
renovate[bot] wants to merge 1 commit into
Conversation
Contributor
Author
|
renovate
Bot
force-pushed
the
renovate/black-26.x
branch
2 times, most recently
from
March 12, 2026 05:49
4464b4a to
76274a8
Compare
renovate
Bot
force-pushed
the
renovate/black-26.x
branch
2 times, most recently
from
May 18, 2026 18:42
f28faa7 to
378df09
Compare
renovate
Bot
force-pushed
the
renovate/black-26.x
branch
from
October 4, 2026 20:29
378df09 to
d15d00d
Compare
renovate
Bot
force-pushed
the
renovate/black-26.x
branch
from
October 10, 2026 06:24
d15d00d to
9abecfc
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Note
This PR body was truncated due to platform limits.
This PR contains the following updates:
==23.12.1→==26.10.1Release Notes
psf/black (black)
v26.10.1Compare Source
Highlights
This release fixes a security issue in Black's bundled GitHub Action. Repositories that
use the action are encouraged to update to the latest version of Black immediately. This
update is received automatically when using
psf/black@stable, and is independent ofthe version of Black installed by the action.
When the GitHub Action reads version specifiers from
tool.black.required-version, itnow only accepts released versions of Black, as it already did for
blackrequirementsin dependency lists. Other values, such as URL references, are now rejected. This issue
has been registered as
GHSA-cg8m-r9f2-5wm2; a CVE identifier is pending.Stable style
x = !ls -la) being wrappedin parentheses, which IPython can no longer run; such cells are now left unchanged
(#5481)
--line-rangesunchanged (#5436)--line-rangesformatting lines that follow a statement when formatting joins orre-indents that statement (#5484)
--line-rangescrashing with an internal error when an unselected statement has a# fmt: skipcomment on the last line before a closing bracket (#5477)# -*- coding: latin-1 -*-) ontothe first two lines of a file (#5487)
last line is near the line length limit (#5494)
Preview style
or comprehensions) inside brackets when preceded by a standalone comment (#5455)
string_processingfeature removing backslash-newline sequences fromraw strings, which changed their value (#5482)
assignments (such as annotated assignments or subscript targets) (#5473)
under
--preview(#5442)wrap_long_dict_values_in_parensdropping the parentheses around a right-handside that contains a dictionary, leaving a line over the length limit (#5492)
string_processingfeature adding a space after*or**in a PEP695 type parameter (
* Ts = ...) when it splits a string in the parameter's default(#5504)
earlier bracket split exceeds the line length only due to a trailing comment (#5498)
Configuration
--cache-dirto configure the cache directory from the command line (#5433)--line-ranges,which made a later full
black --checkpass andblackskip the unformatted lines(#5476)
.gitignorethat starts with a UTF-8 byte order mark. The mark became partof the first pattern, so that pattern never matched and Black formatted files that git
ignores (#5497)
Performance
pairs (such as consecutive subscripts) (#5475)
Integrations
use_pyprojectisenabled (#5479)
tool.black.required-version, itnow only accepts released versions of Black, as it already did for
blackrequirements in dependency lists. Other values, such as URL references, are now
rejected. (#5510)
v26.10.0Compare Source
Stable style
--line-rangesno longer inserts an empty line after a docstring when the rangecovers only the docstring itself (#5312)
# fmt: skipon a bracketed ternary turning the surrounding tuple into a call(#5464)
# fmt: skipis placed on a one-line function or class with PEP 695type parameters (#5429)
inside the parentheses when the parenthesized expression contains own-line comments
(#5395)
# fmt: skipis placed on a bracket of anif,while,for, orwithheader (#5401, #5405)# fmt: skip(#5414)earlier on the line (#5381)
# fmt: oncomment (#5300)(x): int = 5), which prevent CPython from including the name in__annotations__(#5321)
t" spam "asthe first statement of a module, class or function) (#5287)
t'\'{a["b"]}\'') (#5265)already-escaped double quote (e.g.
'''\'''\"''') (#5262)--skip-magic-trailing-commadropping the trailing comma from a splitsingle-element tuple used as a lambda parameter default (#5246)
parenthesized assert message) (#5241)
--skip-magic-trailing-commadropping the trailing comma of a one-elementsubscript (
a[x,]) when the line is long enough to be split and contains a poweroperator (#5272)
(#5144)
*TypeVarTupleor**ParamSpec(#5244)# fmt: off/# fmt: onblock is followed by awithstatement after another standalone comment (#5189)
case case if ...match patterns at very small linelengths (#5147)
docstrings (#5148)
# fmt: skipon a line that opens a bracket (e.g.from x import ( # fmt: skip) when a standalone comment is among the bracket'scontents (#5161)
# type: ignorecomments in a parenthesizedattribute chain were merged onto one physical line (#5297)
--line-ranges(#5175)# fmt: skipis used on one-lineasync def,async with, andasync forstatements containing a semicolon (#5311)(#5461)
--skip-source-first-lineturning the skipped line's CRLF ending into\r\r\nwhen reformatting a file with CRLF line endings (#5438)
Preview style
New preview features
(e.g. stop splitting inside the
[2]of[1,][2](3)) (#5448)wrapped onto a new line instead (#5435)
for (x), (y) in points:becomesfor x, y in points:) (#5416)Tprefixes on t-strings to lowercase (#5425)# fmt: offblockafter an import (#5238)
(e.g.
x[key] = expr) (#5095)yieldstatements for consistency with functioncalls and returns (#5170)
not in,==,is, ...) whenthe right-hand side is a bracketed expression, and instead split inside the brackets
(#5135)
.pyistub files, enforce a blank line after a function or method that has adocstring-only body when another comment or statement follows it (#5158)
Updates to existing preview features
# fmt: skipis placed on a function in a group ofsame-name decorated functions (e.g.
@overloads or a property setter) (#5430)[x for x in (lambda: 0) if x]) (#5176, #5200)Updates to existing unstable features
# type: ignorecomments as single-line unsplittable expressions (#5466)
merging a backslash-continued string on the same line (#5449)
(#5427)
# type: ignorecomments onto oneline (#5271)
# type: ignoreis lost during formatting of a long parenthesizedstring (#5329)
r"..." r"...") being wrapped in parentheses (#5434)Configuration
NO_COLORenvironment variable to disable ANSI output (#5129)--target-versionflag (#5167)--force-excludenot excluding files whose path contains..(e.g.black ../generated/file.pyrun from a subdirectory) (#5471)no common project root (e.g. they are on different drives on Windows) instead of
crashing (#5386)
pyproject.tomlpath when--codeis used from differentworking directories in the same process (#5152)
--line-rangesvalues (#5107)EOFError(#5192)includeandforce-excludevalues inpyproject.toml(#5193)BLACK_NUM_WORKERSvalues and report invalid values as usage errors insteadof crashing (#5211)
Packaging
PyInstaller release build (#5223)
Immutable Releases
(#5296)
Performance
# fmt: skip/# fmt: off/# fmt: oncomments(#5169, #5190, #5232)
with triple-quoted strings as values) (#5188)
match/caseblocks)(#5186)
large dict literals (in
--preview) (#5184)--line-rangeson files with many sibling blocks (a longif/elifchain, amatchwith many cases, or many top-level definitions) (#5213)operators (e.g. a long run of implicitly concatenated strings inside
[]) (#5239)a ** b ** c ** ...chain) (#5235)
if/elifchains and other compound statements with manyclauses (#5322)
string_processing:(#5165)
"%s ..." % (a, b, c, ...)) (#5178, #5199, #5220)Output
path:line:columnlocations (#5237)sys.stdoutthat has nobufferattribute (e.g. in Jupyter notebooks) (#5411)
Blackd
X-Python-Variantheader is empty or has anempty entry (e.g. a trailing comma) (#5428)
pyiin theX-Python-Variantheader (#5441)Integrations
migrate-blackscript (#5319)tool.black.required-versionfor the GitHubAction (#5399)
is_formatted,change_count,same_count,failure_count) to GitHubAction runs (#5408)
Documentation
vim-python-pep8-indent, which provides anindentexprfor Black-styleinsert-mode indentation (#5288)
v26.5.1Compare Source
Stable style
an inline comment (e.g.
x: list[ # pyright: ignore[...]) (#5130)# type: ignore) immediately before a# fmt: skipline, avoiding AST equivalence failures (#5139)Packaging
Documentation
(#5124)
v26.5.0Compare Source
Highlights
both new syntactic features in Python 3.15 (#5048)
performance may be slower than on existing Python versions. Wheels will be provided
once Python 3.15 is later in its release cycle. (#5127)
Stable style
# fmt: skipbeing ignored in nestedifexpressions with parenthesizedinclauses (#4903)
# fmt: offcomment inside brackets (#5097)# fmt: skipis placed on thecolon line (#5117)
Preview style
groups of same-name decorated functions (such as
@overloadgroups) in.pyistubfiles (#5021)
.pyistubfiles (#5092)
(e.g.
# type: ignore) follows the closing bracket (#5096)Packaging
Output
(#5068)
SourceASTParseErrorto distinguish source parse failures from internal safetyerrors, improving error reporting when Black's lenient parser accepts input that
ast.parse()rejects (#5080)Blackd
HTTP 500 only for genuine internal safety errors (#5080)
Integrations
match (#4916)
Documentation
(#5063)
sublackplugin is archived andunmaintained (#5082)
v26.3.1Compare Source
Stable style
exact-length placeholders for short magics and aborting if a placeholder can no longer
be unmasked safely (#5038)
Configuration
--python-cell-magicsso custommagic names cannot affect cache paths (#5038)
Blackd
and request body limits, and bound executor submissions to improve backpressure
(#5039)
v26.3.0Compare Source
Stable style
# type: ignorecomments would be merged with othercomments on the same line, preventing AST equivalence failures (#4888)
Preview style
ifguards incaseblocks were incorrectly split when the pattern hada trailing comma (#4884)
string_processingcrashing on unassigned long string literals with trailingcommas (one-item tuples) (#4929)
Packaging
frozen environments (#4930)
Performance
uvloop.install()in favor ofuvloop.new_event_loop()(#4996)
maybe_install_uvloopfunction tomaybe_use_uvloopto simplify loopinstallation and creation of either a uvloop/winloop eventloop or default eventloop
(#4996)
Output
version, since AST safety checks cannot parse newer syntax. Also replace the
misleading "INTERNAL ERROR" message with an actionable error explaining the version
mismatch (#4983)
Blackd
windows when winloop is installed. (#4996)
Integrations
blackrequirements in the GitHub Action whenuse_pyprojectisenabled so that only version specifiers are accepted and direct references such as
black @ https://...are rejected. Users should upgrade to the latest version of theaction as soon as possible. This update is received automatically when using
psf/black@stable, and is independent of the version of Black installed by theaction. (#5031)
Documentation
wrap_comprehension_in,simplify_power_operator_hugging, andwrap_long_dict_values_in_parensfeatures(#4987)
v26.1.0Compare Source
Highlights
Introduces the 2026 stable style (#4892), stabilizing the following changes:
always_one_newline_after_import: Always force one blank line after importstatements, except when the line after the import is a comment or an import statement
(#4489)
fix_fmt_skip_in_one_liners: Fix# fmt: skipbehavior on one-liner declarations,such as
def foo(): return "mock" # fmt: skip, where previously the declaration wouldhave been incorrectly collapsed (#4800)
fix_module_docstring_detection: Fix module docstrings being treated as normalstrings if preceded by comments (#4764)
fix_type_expansion_split: Fix type expansions split in generic functions (#4777)multiline_string_handling: Make expressions involving multiline strings more compact(#1879)
normalize_cr_newlines: Add\rstyle newlines to the potential newlines tonormalize file newlines both from and to (#4710)
remove_parens_around_except_types: Remove parentheses around multiple exceptiontypes in
exceptandexcept*withoutas(#4720)remove_parens_from_assignment_lhs: Remove unnecessary parentheses from the left-handside of assignments while preserving magic trailing commas and intentional multiline
formatting (#4865)
standardize_type_comments: Format type comments which have zero or more spacesbetween
#andtype:or betweentype:and value to# type: (value)(#4645)The following change was not in any previous stable release:
_width_table.pyand added tests for the Khmer language (#4253)This release also bumps
pathspecto v1 and fixes inconsistencies with Git's.gitignorelogic (#4958). Now, files will be ignored if a pattern matches them, evenif the parent directory is directly unignored. For example, Black would previously
format
exclude/not_this/foo.pywith this.gitignore:Now,
exclude/not_this/foo.pywill remain ignored. To ensureexclude/not_this/andall of its children are included in formatting (and in Git), use this
.gitignore:This new behavior matches Git. The leading
*/are only necessary if you wish to ignorematching subdirectories (like the previous behavior did), and not just matching root
directories.
Output
Integrations
v25.12.0Compare Source
Highlights
Stable style
# fmt: off/# fmt: onblocks were incorrectlyremoved, particularly affecting Jupytext's
# %% [markdown]comments (#4845)# fmt: skipcomments are used in a multi-part if-clause, onstring literals, or on dictionary entries with long lines (#4872)
fmt:directives aren't on the top level (#4856)Preview style
fmt: skipskipping the line after instead of the line it's on (#4855)magic trailing commas and intentional multiline formatting (#4865)
fix_fmt_skip_in_one_linerscrashing onwithstatements (#4853)fix_fmt_skip_in_one_linerscrashing on annotated parameters (#4854)# fmt: skipon them (#4894)Packaging
Integrations
output-fileinput to GitHub Actionpsf/blackto write formatter output to afile for artifact capture and log cleanliness (#4824)
v25.11.0Compare Source
Highlights
Stable style
# fmt: offand# fmt: onwere reformatted (#4811)being normalized (#4811)
Preview style
multiline_string_handlingfrom--unstableto--preview(#4760)comments (#4764)
# type: <value>(#4645)fix_fmt_skip_in_one_linerspreview feature to respect# fmt: skipfor compoundstatements with semicolon-separated bodies (#4800)
Configuration
no_cacheoption to control caching behavior. (#4803)Packaging
Output
(#4610)
Blackd
requests to blackd (#4774)
Integrations
psf/blackto support therequired-versionmajor-version-only"stability" format when using pyproject.toml (#4770)
v25.9.0Compare Source
Highlights
await/asyncas soft keywords/variable names(#4676)
Stable style
delstatement containing tuples (#4628)withstatements (#4630)
# fmt: skipfollowed by a comment at the end of file (#4635)asclause of awithstatement (#4634)withstatement (#4646)\followed by a\rfollowed by a comment (#4663)\\r\n(#4673)await ...(where...is a literalEllipsis) (#4676)(#4670)
Preview style
# fmt: skipwould stillbe formatted (#4552)
multiline_string_handlingwith ternaries and dictionaries (#4657)string_processingwould not split f-strings directly afterexpressions (#4680)
inclause of comprehensions across lines if necessary (#4699)exceptandexcept*withoutas. (#4720)\rstyle newlines to the potential newlines to normalize file newlines both fromand to (#4710)
Parser
parameter bounds and defaults. (#4602)
Performance
Integrations
psf/blackto read Black version from an additional section inpyproject.toml:
[project.dependency-groups](#4606)Documentation
v25.1.0Compare Source
Highlights
This release introduces the new 2025 stable style (#4558), stabilizing the following
changes:
# fmt: skipcomments is no longer normalized (#4146)(#4154)
*and more complex type variable tuple (#4440)The following changes were not in any previous release:
over multiple lines first instead of type parameter definitions (#4553)
Stable style
empty lines (#4484)
withstatements containing tuple generators/unpacking(#4538)
Preview style
(#4498)
string_processingandwrap_long_dict_values_in_parensfrom removingparentheses around long dictionary values (#4377)
wrap_long_dict_values_in_parensfrom the unstable to preview style (#4561)Packaging
License-Expressionmetadata field, seePEP 639. (#4479)
Performance
is_fstring_startfunction in Black's tokenizer (#4541)Integrations
--stdin-filenameset to a force excluded path, stdin won't beformatted. (#4539)
v24.10.0Compare Source
Highlights
mypyc-compiled wheels. (#4436) (#4449)
safety issue in Python 3.12.5 that can cause Black's AST safety checks to fail. Please
use Python 3.12.6 or Python 3.12.4 instead. (#4447)
Stable style
X | Ystyle unions.(#4453)
%%magic (#4462)Preview style
def fn(*args: *tuple[*Ts, T]) -> None: pass) (#4440)Caching
--unstable(#4466)Packaging
blackdnow requires a newer version of aiohttp. (#4451)Output
v24.8.0Compare Source
Stable style
# fmt: offis used before a closing parenthesis or bracket. (#4363)Packaging
linked. This improves the PyPI listing for Black. (#4345)
Parser
multiline string (#4339)
(#4401)
\{inside f-strings very well (#4422)(#4423)
Performance
.gitignore(#4415)Blackd
v24.4.2Compare Source
This is a bugfix release to fix two regressions in the new f-string parser introduced in
24.4.1.
Parser
Performance
v24.4.1Compare Source
Highlights
Stable style
Parser
by PEP 696 (#4327)
Integrations
git archiveis skipped (#4313)v24.4.0Compare Source
Stable style
Preview style
ifguards incaseblocks are now wrapped in parentheses when the line is too long.(#4269)
Integrations
use_pyprojectto the GitHub Actionpsf/black. This will read theBlack version from
pyproject.toml. (#4294)v24.3.0Compare Source
Highlights
This release is a milestone: it fixes Black's first CVE security vulnerability. If you
run Black on untrusted input, or if you habitually put thousands of leading tab
characters in your docstrings, you are strongly encouraged to upgrade immediately to fix
CVE-2024-21503.
This release also fixes a bug in Black's AST safety check that allowed Black to make
incorrect changes to certain f-strings that are valid in Python 3.12 and higher.
Stable style
of Black would incorrectly format the contents of certain unusual f-strings containing
nested strings with the same quote type. Now, Black will crash on such strings until
support for the new f-string syntax is implemented. (#4270)
(#4273)
Performance
characters. This fixes
CVE-2024-21503.
(#4278)
Documentation
--checkis used with--quiet(#4236)v24.2.0Compare Source
Stable style
(#4218)
Preview style
hug_parens_with_braces_and_square_bracketsfeature to the unstable styledue to an outstanding crash and proposed formatting tweaks (#4198)
expression (#4154)
(#4185)
casestatementifguards (#4214).Configuration
pyproject.tomlthat is missing atool.blacksection whendiscovering project root and configuration. Since Black continues to use version
control as an indicator of project root, this is expected to primarily change behavior
for users in a monorepo setup (desirably). If you wish to preserve previous behavior,
simply add an empty
[tool.black]to the previously discoveredpyproject.toml(#4204)
Output
SyntaxWarnings orDeprecationWarnings produced by theastmodule when performing equivalence checks (#4189)
Integrations
v24.1.1Compare Source
Bugfix release to fix a bug that made Black unusable on certain file systems with strict
limits on path length.
Preview style
Configuration
do not support long paths (#4176)
v24.1.0Compare Source
Highlights
This release introduces the new 2024 stable style (#4106), stabilizing the following
changes:
if-elseexpressions (#2278)...are formatted morecompactly (#3796)
([#3368](https://redirect.git
Configuration
📅 Schedule: (UTC)
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.