When checking for consistency betwene the docstring arguments and the
arguments in the function signature, ignore underscore arguments (_,
__, ___, ...) in the arguments in the function signature
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: off automatically dedents when used with the --line-ranges
option, 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-ranges now skips Black's internal stability check in --safe mode. This
avoids a crash on rare inputs that have many unformatted same-content lines. (#4034)
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: off automatically dedents when used with the --line-ranges
option, 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-ranges now skips Black's internal stability check in --safe mode. This
avoids a crash on rare inputs that have many unformatted same-content lines. (#4034)
Fix a performance problem with HTML extraction where large HTML input could
trigger quadratic line counting behavior (#1392).
Improve and expand type annotations in the code base (#1394).
[3.5] -- 2023-10-06
Added
Add permalink_leading configuration option to the toc extension (#1339)
A new boolean option permalink_leading controls the position of the permanent
link anchors generated with permalink. Setting permalink_leading to True
will cause the links to be inserted at the start of the header, before any other
header content. The default behavior for permalink is to append permanent
links to the header, placing them after all other header content.
Changed
Add support for cPython version 3.12 (and PyPy 3.10) and drop support for
Python version 3.7 (#1357).
Stubgen will now include __all__ in its output if it is in the input file (PR 16356).
Mypy 1.7
We’ve just uploaded mypy 1.7 to the Python Package Index (PyPI). Mypy is a static type checker for Python. This release includes new features, performance improvements and bug fixes. You can install it as follows:
python3 -m pip install -U mypy
You can read the full documentation for this release on Read the Docs.
Using TypedDict for **kwargs Typing
Mypy now has support for using Unpack[...] with a TypedDict type to annotate **kwargs arguments enabled by default. Example:
# Or 'from typing_extensions import ...'
from typing import TypedDict, Unpack
class Person(TypedDict):
name: str
age: int
def foo(**kwargs: Unpack[Person]) -> None:
...
foo(name="x", age=1) # Ok
foo(name=1) # Error
The definition of foo above is equivalent to the one below, with keyword-only arguments name and age:
def foo(*, name: str, age: int) -> None:
...
Refer to PEP 692 for more information. Note that unlike in the current version of the PEP, mypy always treats signatures with Unpack[SomeTypedDict] as equivalent to their expanded forms with explicit keyword arguments, and there aren't special type checking rules for TypedDict arguments.
This was contributed by Ivan Levkivskyi back in 2022 (PR 13471).
TypeVarTuple Support Enabled (Experimental)
Mypy now has support for variadic generics (TypeVarTuple) enabled by default, as an experimental feature. Refer to PEP 646 for the details.
TypeVarTuple was implemented by Jared Hance and Ivan Levkivskyi over several mypy releases, with help from Jukka Lehtosalo.
Bumps the optional group with 14 updates:
0.3.2
0.3.8
23.9.1
23.12.0
5.12.0
5.13.2
3.4.4
3.5.1
1.0.4
1.0.5
9.3.1
9.5.2
0.23.0
0.24.0
1.5.1
1.7.1
3.4.2.10
3.5.0.3
1.24.12
1.53.0.3
3.0.2
3.0.3
7.4.2
7.4.3
3.11.1
3.12.0
0.21.1
0.23.2
Updates
pydoclint
from 0.3.2 to 0.3.8Release notes
Sourced from pydoclint's releases.
Changelog
Sourced from pydoclint's changelog.
... (truncated)
Commits
b5612ff
Improve documentation71cdf37
Fix prepended escape char handling (#94)d2b1d21
Update version; update changelogf70caa4
Disable parallel mode in pre-commit (#93)def500f
Update pre-commit dependencies04bd231
Improve documentationef6dc07
Update dependency to fix return section parsing (#90)38ae4c6
Bump version to 0.3.507611e6
Ignore underscore args when checking args (#89)dd59b87
Add changelog for v0.3.4Updates
black
from 23.9.1 to 23.12.0Release notes
Sourced from black's releases.
... (truncated)
Changelog
Sourced from black's changelog.
... (truncated)
Commits
d9ad09a
Prepare release 23.12.0 (#4105)ebd543c
Fix feature detection for parenthesized context managers (#4104)eb7661f
Fix another case where we format dummy implementation for non-functions/class...0c98999
Fix path in test message (#4102)9aea976
Only use dummy implementation logic for functions and classes (#4066)67b23d7
Bump actions/setup-python from 4 to 5 (#4101)ce28be2
Add dedicated preview feature for East Asian Width (#4097)61b529b
Allow empty lines at beginning of blocks (again) (#4060)e7e122e
docs: Movefmt: off
docs (#4090)432d905
docs: Unify option descriptions between--help
andthe_basics.md
(#4076)Updates
isort
from 5.12.0 to 5.13.2Release notes
Sourced from isort's releases.
... (truncated)
Changelog
Sourced from isort's changelog.
Commits
c655831
Merge pull request #2214 from PyCQA/version/5.13.2b4335b4
Prepare version 5.13.2c36e43c
Merge pull request #2184 from bp72/issue/2154e38702f
Merge pull request #2213 from davidculley/confine-precommit-to-stagesee8d87f
Add fix for the error found by hypothesis5849ec2
Apply the bracket fix from issue 471 only for use_parentheses=Truedf0e119
confine pre-commit to stages9255bca
Merge pull request #2212 from PyCQA/bugfix/#2211-colors-extra5336d7d
Fix colors extras643d9c4
Merge pull request #2210 from PyCQA/version/5.13.1Updates
markdown
from 3.4.4 to 3.5.1Release notes
Sourced from markdown's releases.
Changelog
Sourced from markdown's changelog.
Commits
f50ac47
Refactor changelog6662053
TOC extension: Add new boolean option permalink_prepend (#1339)Updates
mkdocs-macros-plugin
from 1.0.4 to 1.0.5Changelog
Sourced from mkdocs-macros-plugin's changelog.
Commits
4bfda0b
Fix issue with changelog no longer displayed (#186)82c5cdd
Merge pull request #183 from marcospereira/add-short-tag298f07f
Add a short_tag attribute to git context428a015
Remove include-markdown in webdoc, since it crashed readthedocs2161dd4
Update .readthedocs.ymlc64a08d
Merge pull request #182 from SimonMarquis/patch-11c1d2c4
Fix typo inRich Markdown Pages
docs9dba19e
Merge branch 'master' of github.com:fralau/mkdocs_macros_plugin into master7da7089
Add experimental logo0d36dde
Add experimental logoUpdates
mkdocs-material
from 9.3.1 to 9.5.2Release notes
Sourced from mkdocs-material's releases.
... (truncated)
Changelog
Sourced from mkdocs-material's changelog.
... (truncated)
Commits
2ca5cf0
Prepare 9.5.2 release52feaba
Merge branch 'master' of github.com:squidfunk/mkdocs-material649db51
Updated dependencies738dd7d
Merge pull request #6486 from squidfunk/dependabot/github_actions/actions/set...ef00a47
Merge pull request #6487 from squidfunk/dependabot/github_actions/actions/dep...cc03f10
Bump actions/deploy-pages from 2 to 385a3298
Bump actions/setup-python from 4 to 5419898a
Documentation (#6477)afd9d0a
Merge branch 'master' of github.com:squidfunk/mkdocs-materialadad823
Fixed config types for blog plugin slugify functionsUpdates
mkdocstrings[python]
from 0.23.0 to 0.24.0Release notes
Sourced from mkdocstrings[python]'s releases.
Changelog
Sourced from mkdocstrings[python]'s changelog.
Commits
032e417
chore: Prepare release 0.24.0ce84dd5
feat: Cache downloaded inventories as local file4a97755
docs: Make recipe work with MkDocs-f
optionb3edf89
ci: Some typing fixes/ignored74fada
tests: Stop passing config file path to MkDocsConfig4dbb6d6
ci: Ruff auto-fix39694ac
chore: Template upgradeafc4ea4
fix:custom_templates
config was dropped in previous commit (#630)b61d4d1
refactor: Drop support for MkDocs < 1.4, modernize usages370a61d
fix: Makecustom_templates
relative to the config fileUpdates
mypy
from 1.5.1 to 1.7.1Changelog
Sourced from mypy's changelog.
... (truncated)
Commits
6b3c418
Update version to 1.7.1 (without +dev)c10e173
[mypyc] Fix regression with nested functions (#16484)e6399d1
Fix polymorphic application for callback protocols (#16514)661adb7
Fix crash on strict-equality with recursive types (#16483)6c8e0cc
Ignore position if imprecise arguments are matched by name (#16471)5c354c4
Fix missing meet case exposed by len narrowing (#16470)88791ca
Exclude private attributes from override checks (#16464)4b5b316
Special-case unions in polymorphic inference (#16461)f862d3e
Fix crash on Callable self in call (#16453)fe79a59
Bump version to 1.7.1+devUpdates
types-markdown
from 3.4.2.10 to 3.5.0.3Commits
Updates
grpc-stubs
from 1.24.12 to 1.53.0.3Commits
Updates
pylint
from 3.0.2 to 3.0.3Commits
1a5ffc1
Bump pylint to 3.0.3, update changelog54687e7
Disallow isort 5.13.0 (#9290) (#9292)fea5483
[wrong-exception-operation] Fix FP for tuple concatenation of exception types...d0d5c91
[pointless-string-statement] Ignore docstrings on py3.12 type aliases (#9269)...81f0f2e
[Backport maintenance/3.0.x] [bugfix] Find files with ./ as input with a __in...7f01d83
Fix doc generation in implicit-str-concata60ddd1
Fix incorrect suggestion for unnecessary-comprehension (#9172) (#9242)dc11223
[todos] Fix the todos version and the warnings' text (#9202) (#9204)0273db7
Fix false positive forunnecessary-lambda
. (#9149) (#9200)53d4541
Fixundefined-variable
etc for Python 3.12 generic type syntax (#9195) (#9199)Updates
pytest
from 7.4.2 to 7.4.3Release notes
Sourced from pytest's releases.
Commits
Looks like these dependencies are updatable in another way, so this is no longer needed.