Sourced from black's releases.
22.6.0
Style
- Fix unstable formatting involving
#fmt: skip
and# fmt:skip
comments (notice the lack of spaces) (#2970)Preview style
- Docstring quotes are no longer moved if it would violate the line length limit (#3044)
- Parentheses around return annotations are now managed (#2990)
- Remove unnecessary parentheses around awaited objects (#2991)
- Remove unnecessary parentheses in
with
statements (#2926)- Remove trailing newlines after code block open (#3035)
Integrations
- Add
scripts/migrate-black.py
script to ease introduction of Black to a Git project (#3038)Output
- Output Python version and implementation as part of
--version
flag (#2997)Packaging
- Use
tomli
instead oftomllib
on Python 3.11 builds wheretomllib
is not available (#2987)Parser
- PEP 654 syntax (for example,
except *ExceptionGroup:
) is now supported (#3016)- PEP 646 syntax (for example,
Array[Batch, *Shape]
ordef fn(*args: *T) -> None
) is now supported (#3071)Vim Plugin
- Fix
strtobool
function. It didn't parse true/on/false/off. (#3025)Full Changelog: https://github.com/psf/black/compare/22.3.0...22.6.0
Thank you!
@jpy-git
for improving our parentheses formatting significantly@siuryan
for fixing a fmt: skip bug, making it a little less annoying to use :)@isidentical
for implementing support for PEP 654 and 646 syntax@defntvdm
for fixing our vim plugin, especially as we (the maintainers) don't really know vim script sadly@idorrington92
for fixing the docstring bug where Black would move the closing quotes causing it to violate the line length limit (whoops!)@hbrunn
for contributing the migrate-black script@saroad2
for improving newline handling after code blocks and test infrastructure improvements... and everyone else who contributed documentation, tests, or other improvements to the Black project!
... (truncated)
Sourced from black's changelog.
22.6.0
Style
- Fix unstable formatting involving
#fmt: skip
and# fmt:skip
comments (notice the lack of spaces) (#2970)Preview style
- Docstring quotes are no longer moved if it would violate the line length limit (#3044)
- Parentheses around return annotations are now managed (#2990)
- Remove unnecessary parentheses around awaited objects (#2991)
- Remove unnecessary parentheses in
with
statements (#2926)- Remove trailing newlines after code block open (#3035)
Integrations
- Add
scripts/migrate-black.py
script to ease introduction of Black to a Git project (#3038)Output
- Output Python version and implementation as part of
--version
flag (#2997)Packaging
- Use
tomli
instead oftomllib
on Python 3.11 builds wheretomllib
is not available (#2987)Parser
- PEP 654 syntax (for example,
except *ExceptionGroup:
) is now supported (#3016)- PEP 646 syntax (for example,
Array[Batch, *Shape]
ordef fn(*args: *T) -> None
) is now supported (#3071)Vim Plugin
- Fix
strtobool
function. It didn't parse true/on/false/off. (#3025)22.3.0
Preview style
- Code cell separators
#%%
are now standardised to# %%
(#2919)- Remove unnecessary parentheses from
except
statements (#2939)- Remove unnecessary parentheses from tuple unpacking in
for
loops (#2945)- Avoid magic-trailing-comma in single-element subscripts (#2942)
Configuration
... (truncated)
f6c139c
Prepare docs for release 22.6.0 (#3139)eb5d175
Update preview style docs to include recent changes (#3136)d848209
Bump furo from 2022.6.4.1 to 2022.6.21 in /docs (#3138)fa6caa6
Only call get_future_imports when needed (#3135)6463fb8
Bump sphinx from 5.0.1 to 5.0.2 in /docs (#3128)e3c9b04
Replace link to Requests documentation (#3125)6c1bd08
Test run black on self (#3114)799adb5
Bump actions/setup-python from 3 to 4 (#3121)162ecd1
Use is_number_token instead of assertion (#3069)8c8675c
Update documentation dependencies (#3118)Sourced from black's releases.
22.3.0
Preview style
- Code cell separators
#%%
are now standardised to# %%
(#2919)- Remove unnecessary parentheses from
except
statements (#2939)- Remove unnecessary parentheses from tuple unpacking in
for
loops (#2945)- Avoid magic-trailing-comma in single-element subscripts (#2942)
Configuration
- Do not format
__pypackages__
directories by default (#2836)- Add support for specifying stable version with
--required-version
(#2832).- Avoid crashing when the user has no homedir (#2814)
- Avoid crashing when md5 is not available (#2905)
- Fix handling of directory junctions on Windows (#2904)
Documentation
- Update pylint config documentation (#2931)
Integrations
- Move test to disable plugin in Vim/Neovim, which speeds up loading (#2896)
Output
- In verbose, mode, log when Black is using user-level config (#2861)
Packaging
- Fix Black to work with Click 8.1.0 (#2966)
- On Python 3.11 and newer, use the standard library's
tomllib
instead oftomli
(#2903)black-primer
, the deprecated internal devtool, has been removed and copied to a separate repository (#2924)Parser
- Black can now parse starred expressions in the target of
for
andasync for
statements, e.gfor item in *items_1, *items_2: pass
(#2879).
Sourced from black's changelog.
22.3.0
Preview style
- Code cell separators
#%%
are now standardised to# %%
(#2919)- Remove unnecessary parentheses from
except
statements (#2939)- Remove unnecessary parentheses from tuple unpacking in
for
loops (#2945)- Avoid magic-trailing-comma in single-element subscripts (#2942)
Configuration
- Do not format
__pypackages__
directories by default (#2836)- Add support for specifying stable version with
--required-version
(#2832).- Avoid crashing when the user has no homedir (#2814)
- Avoid crashing when md5 is not available (#2905)
- Fix handling of directory junctions on Windows (#2904)
Documentation
- Update pylint config documentation (#2931)
Integrations
- Move test to disable plugin in Vim/Neovim, which speeds up loading (#2896)
Output
- In verbose, mode, log when Black is using user-level config (#2861)
Packaging
- Fix Black to work with Click 8.1.0 (#2966)
- On Python 3.11 and newer, use the standard library's
tomllib
instead oftomli
(#2903)black-primer
, the deprecated internal devtool, has been removed and copied to a separate repository (#2924)Parser
- Black can now parse starred expressions in the target of
for
andasync for
statements, e.gfor item in *items_1, *items_2: pass
(#2879).
ae2c075
Prepare release 22.3.0 (#2968)e9681a4
Fix _unicodefun patch code for Click 8.1.0 (#2966)ac7402c
Bump sphinx from 4.4.0 to 4.5.0 in /docs (GH-2959)f239d22
Enforce no formatting changes for PRs via CI (GH-2951)bd1e980
Remove unnecessary parentheses from except
clauses (#2939)14d84ba
Resolve new flake8-bugbear errors (B020) (GH-2950)14e5ce5
Remove unnecessary parentheses from tuple unpacking in for
loops (#2945)3800ebd
Avoid magic-trailing-comma in single-element subscripts (#2942)062b549
Github now supports .git-blame-ignore-revs (GH-2948)5379d4f
stub style: remove some possible future changes (#2940)