Update dependency black to v23.12.1
This PR contains the following updates:
| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| black (changelog) | 23.7.0 -> 23.12.1 |
Release Notes
psf/black (black)
v23.12.1
Packaging
- Fixed a bug that included dependencies from the
dextra by default (#โ4108)
v23.12.0
Highlights
It's almost 2024, which means it's time for a new edition of Black's stable style! Together with this release, we'll put out an alpha release 24.1a1 showcasing the draft 2024 stable style, which we'll finalize in the January release. Please try it out and share your feedback.
This release (23.12.0) will still produce the 2023 style. Most but not all of the
changes in --preview mode will be in the 2024 stable style.
Stable style
- Fix bug where
# fmt: offautomatically dedents when used with the--line-rangesoption, even when it is not within the specified line range. (#โ4084) - Fix feature detection for parenthesized context managers (#โ4104)
Preview style
- Prefer more equal signs before a break when splitting chained assignments (#โ4010)
- Standalone form feed characters at the module level are no longer removed (#โ4021)
- Additional cases of immediately nested tuples, lists, and dictionaries are now indented less (#โ4012)
- Allow empty lines at the beginning of all blocks, except immediately before a docstring (#โ4060)
- Fix crash in preview mode when using a short
--line-length(#โ4086) - Keep suites consisting of only an ellipsis on their own lines if they are not functions or class definitions (#โ4066) (#โ4103)
Configuration
--line-rangesnow skips Black's internal stability check in--safemode. This avoids a crash on rare inputs that have many unformatted same-content lines. (#โ4034)
Packaging
- Upgrade to mypy 1.7.1 (#โ4049) (#โ4069)
- Faster compiled wheels are now available for CPython 3.12 (#โ4070)
Integrations
- Enable 3.12 CI (#โ4035)
- Build docker images in parallel (#โ4054)
- Build docker images with 3.12 (#โ4055)
v23.11.0
Highlights
- Support formatting ranges of lines with the new
--line-rangescommand-line option (#โ4020)
Stable style
- Fix crash on formatting bytes strings that look like docstrings (#โ4003)
- Fix crash when whitespace followed a backslash before newline in a docstring (#โ4008)
- Fix standalone comments inside complex blocks crashing Black (#โ4016)
- Fix crash on formatting code like
await (a ** b)(#โ3994) - No longer treat leading f-strings as docstrings. This matches Python's behaviour and fixes a crash (#โ4019)
Preview style
- Multiline dicts and lists that are the sole argument to a function are now indented less (#โ3964)
- Multiline unpacked dicts and lists as the sole argument to a function are now also indented less (#โ3992)
- In f-string debug expressions, quote types that are visible in the final string are now preserved (#โ4005)
- Fix a bug where long
caseblocks were not split into multiple lines. Also enable general trailing comma rules oncaseblocks (#โ4024) - Keep requiring two empty lines between module-level docstring and first function or class definition (#โ4028)
- Add support for single-line format skip with other comments on the same line (#โ3959)
Configuration
- Consistently apply force exclusion logic before resolving symlinks (#โ4015)
- Fix a bug in the matching of absolute path names in
--include(#โ3976)
Performance
- Fix mypyc builds on arm64 on macOS (#โ4017)
Integrations
- Black's pre-commit integration will now run only on git hooks appropriate for a code formatter (#โ3940)
v23.10.1
Highlights
- Maintenance release to get a fix out for GitHub Action edge case (#โ3957)
Preview style
- Fix merging implicit multiline strings that have inline comments (#โ3956)
- Allow empty first line after block open before a comment or compound statement (#โ3967)
Packaging
- Change Dockerfile to hatch + compile black (#โ3965)
Integrations
- The summary output for GitHub workflows is now suppressible using the
summaryparameter. (#โ3958) - Fix the action failing when Black check doesn't pass (#โ3957)
Documentation
- It is known Windows documentation CI is broken https://github.com/psf/black/issues/39683968
v23.10.0
Stable style
- Fix comments getting removed from inside parenthesized strings (#โ3909)
Preview style
- Fix long lines with power operators getting split before the line length (#โ3942)
- Long type hints are now wrapped in parentheses and properly indented when split across multiple lines (#โ3899)
- Magic trailing commas are now respected in return types. (#โ3916)
- Require one empty line after module-level docstrings. (#โ3932)
- Treat raw triple-quoted strings as docstrings (#โ3947)
Configuration
- Fix cache versioning logic when
BLACK_CACHE_DIRis set (#โ3937)
Parser
- Fix bug where attributes named
typewere not acccepted insidematchstatements (#โ3950) - Add support for PEP 695 type aliases containing lambdas and other unusual expressions (#โ3949)
Output
- Black no longer attempts to provide special errors for attempting to format Python 2 code (#โ3933)
- Black will more consistently print stacktraces on internal errors in verbose mode (#โ3938)
Integrations
- The action output displayed in the job summary is now wrapped in Markdown (#โ3914)
v23.9.1
Due to various issues, the previous release (23.9.0) did not include compiled mypyc wheels, which make Black significantly faster. These issues have now been fixed, and this release should come with compiled wheels once again.
There will be no wheels for Python 3.12 due to a bug in mypyc. We will provide 3.12 wheels in a future release as soon as the mypyc bug is fixed.
Packaging
- Upgrade to mypy 1.5.1 (#โ3864)
Performance
- Store raw tuples instead of NamedTuples in Black's cache, improving performance and decreasing the size of the cache (#โ3877)
v23.9.0
Preview style
- More concise formatting for dummy implementations (#โ3796)
- In stub files, add a blank line between a statement with a body (e.g an
if sys.version_info > (3, x):) and a function definition on the same level (#โ3862) - Fix a bug whereby spaces were removed from walrus operators within subscript(#โ3823)
Configuration
- Black now applies exclusion and ignore logic before resolving symlinks (#โ3846)
Performance
- Avoid importing
IPythonif notebook cells do not contain magics (#โ3782) - Improve caching by comparing file hashes as fallback for mtime and size (#โ3821)
Blackd
- Fix an issue in
blackdwith single character input (#โ3558)
Integrations
- Black now has an
official pre-commit mirror. Swapping
https://github.com/psf/blacktohttps://github.com/psf/black-pre-commit-mirrorin your.pre-commit-config.yamlwill make Black about 2x faster (#โ3828) - The
.black.envfolder specified byENV_PATHwill now be removed on the completion of the GitHub Action (#โ3759)
Configuration
๐ Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
๐ฆ Automerge: Disabled by config. Please merge this manually once you are satisfied.
โป Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
๐ Ignore: Close this PR and you won't be reminded about this update again.
- [ ] If you want to rebase/retry this PR, check this box
This PR was generated by Mend Renovate. View the repository job log.