Improved the violation message of DOC105: the arguments with inconsistent
type hints are now shown in the violation message to make violation
correction much easier
A new config option --show-filenames-in-every-violation-message (or
-sfn), which makes it more convenient to jump to the corresponding line
in IDEs by clicking on the violation message in the terminal
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).
This release brings support for pytest 8, a couple of bug fixes and many improvements to the cookiecutter template.
Upgrading
Once you upgraded, you'll be able to upgrade to pytest 8, and indirectly to sybil 6, which includes types hints. If you do so, you should remove the mypy exception for sybil in the pyproject.toml file.
Search for the tool.mypy.overrides section and remove the "sybil", "sybil.*" enties from the module list.
Cookiecutter template
To upgrade without regenerating the project, you can follow these steps:
Run the following command to add the new pylint ignore rules:
sed '/ # Checked by flake8/a\ "redefined-outer-name",\n "unused-import",' -i pyproject.toml
It is recommended to update this rule in your repository to use the new bypass rule for the Protect version branches ruleset that allows maintainers to force-merge.
You can do this by re-importing the ruleset or manually:
Go to the repository settings -> Rules -> Rulesets -> Protect version branches -> Bypass list -> Add bypass -> Select Maintain role and change the dropdown bypass rule to use Pull requests instead of Always.
The labeler action was upgraded to 5.0.0. This needs a new configuration file.
If you haven't diverged much from the default configuration (and you are not using exclusion rules), you can update the configuration file by running this script in the root of your repository:
Stubtest will ignore private function/method parameters when they are missing from the stub. Private parameters
names start with a single underscore and have a default (PR 16507).
Mypy 1.8
We’ve just uploaded mypy 1.8 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.
Type-checking Improvements
Do not intersect types in isinstance checks if at least one is final (Christoph Tyralla, PR 16330)
Detect that @final class without __bool__ cannot have falsey instances (Ilya Priven, PR 16566)
Do not allow TypedDict classes with extra keywords (Nikita Sobolev, PR 16438)
Do not allow class-level keywords for NamedTuple (Nikita Sobolev, PR 16526)
Make imprecise constraints handling more robust (Ivan Levkivskyi, PR 16502)
Fix strict-optional in extending generic TypedDict (Ivan Levkivskyi, PR 16398)
Allow type ignores of PEP 695 constructs (Shantanu, PR 16608)
Enable type_check_only support for TypedDict and NamedTuple (Nikita Sobolev, PR 16469)
Performance Improvements
Add fast path to analyzing special form assignments (Jukka Lehtosalo, PR 16561)
Improvements to Error Reporting
Don't show documentation links for plugin error codes (Ivan Levkivskyi, PR 16383)
Improve error messages for super checks and add more tests (Nikita Sobolev, PR 16393)
Bumps the optional group with 11 updates:
0.3.2
0.4.1
5.12.0
5.13.2
3.4.4
3.5.2
1.0.4
1.0.5
9.4.4
9.5.12
0.23.0
0.24.1
0.7.5
0.9.1
1.5.1
1.8.0
3.4.2.10
3.5.0.20240129
3.0.2
3.1.0
0.7.5
0.9.1
Updates
pydoclint
from 0.3.2 to 0.4.1Release notes
Sourced from pydoclint's releases.
... (truncated)
Changelog
Sourced from pydoclint's changelog.
... (truncated)
Commits
af2c326
Update changelog3a5e4b0
Remove useless argument--src
(#124)70eb3c8
Fix double quotes in Literal type hint (#123)d2b4b99
Include args with different type hints in DOC105 msg (#120)fa41757
Add option to show filename for each violation msg (#119)b8b4396
Add py312 to CI pipeline01893df
Exclude venv folders in flake8 (#116)676847e
Documenting tool integration (#104)75e485b
Fix false positive DOC203 in property methods (#115)55c0fde
Explain why allow-init-docstring defaults to FalseUpdates
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.2Release notes
Sourced from markdown's releases.
Changelog
Sourced from markdown's changelog.
Commits
08dacae
Bump version to 3.5.2e466f38
Fix handling of bogus comments.a2a9c53
Update change log link in README.mdcef5afe
Update Changelog URL5d7f255
Fix missing search in docsbc14d59
Split changelog workflows to separate logic on when each gets run.9b06df2
ghp-import it not a command moduledac7977
Fix a minor oversight in #1407dcd69b1
Update docs deploy scriptsa63e6f3
Fix edge-case crash in InlineProcessorUpdates
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.4.4 to 9.5.12Release notes
Sourced from mkdocs-material's releases.
... (truncated)
Changelog
Sourced from mkdocs-material's changelog.
... (truncated)
Commits
5108432
Updated changelogd366a45
Fixed instant navigation removing color theme tags6219f3d
Merge branch 'master' of github.com:squidfunk/mkdocs-materialc7bde2d
Formattingde46c41
Fixed document observable not emitting current document7b83b57
Updated contributing guide (#6843)6c2e029
Updated Premium sponsorsb5a5fde
Updated dependenciesc3a1e79
Merge branch 'master' of github.com:squidfunk/mkdocs-materialca7e952
Fixed privacy plugin not handling URL-encoded pathnamesUpdates
mkdocstrings[python]
from 0.23.0 to 0.24.1Release notes
Sourced from mkdocstrings[python]'s releases.
Changelog
Sourced from mkdocstrings[python]'s changelog.
Commits
d716a88
chore: Prepare release 0.24.1c161d26
ci: Remove type ignore comment now that it's fixed in autorefs89f752a
style: Format2fe2b47
chore: Template upgrade080ddad
docs: Fix insiders pagecdd946c
docs: Enable lang class and automatic inline highlight21380ae
docs: Remove mention of directory watchingf553684
ci: Type ignore comment waiting for fix in autorefsa7a2907
refactor: Support new pymdownx-highlight optionsb5236b4
refactor: Backup anchors with id and no href, for compatibility with autorefs...Updates
frequenz-repo-config[api]
from 0.7.5 to 0.9.1Release notes
Sourced from frequenz-repo-config[api]'s releases.
... (truncated)
Commits
b3925ca
Clean up release notes for 0.9.1 (#232)ae48810
Clean up release notes for 0.9.1fb2851a
Initialize repos to version 0.9.1 (#231)1498b05
Initialize repos to version 0.9.1017b18e
Clear release notes (#228)4ca01ac
Clear release notes3e198ce
Prepare release notes for v0.9.0 (#227)665c447
Remove placeholder from RELEASE_NOTES.md9545f59
Add summary to release notes3258f97
Remove conflict markers from RELEASE_NOTES.mdUpdates
mypy
from 1.5.1 to 1.8.0Changelog
Sourced from mypy's changelog.
... (truncated)
Commits
3b46750
remove +dev suffix from versionc9bc833
Fix tests broken by hatchling (#16655)60d30e3
Fix crash with type alias toCallable[[Unpack[Tuple[Any, ...]]], Any]
(#16541)Looks like these dependencies are updatable in another way, so this is no longer needed.