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:
import sys
lines = []
state = "looking"
with open(".github/labeler.yml", encoding="utf-8") as fin:
for line in fin:
if "changed-files:" in line:
sys.stderr.write("Already fixed, aborting...\n")
sys.exit(1)
match state:
case "looking":
if not line.startswith(("#", " ", "\t")) and line.rstrip().endswith(":"):
line = f"{line} - changed-files:\n - any-glob-to-any-file:\n"
state = "in-label"
case "in-label":
if not line.lstrip().startswith("-"):
state = "looking"
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)
This includes an upgrade of repo-config, which requires manual changes (I mean, not technically, as it does work without them, but it would be good to keep in sync with the templates too). It looks like you only applied one of them. Can you maybe apply the rest?
Bumps the optional group with 14 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.3.1
9.5.10
0.23.0
0.24.0
0.8.0
0.9.0
1.5.1
1.8.0
3.4.2.10
3.5.0.20240129
3.0.2
3.0.3
0.8.0
0.9.0
3.11.1
3.12.0
0.21.1
0.23.5
6.98.8
6.98.9
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.3.1 to 9.5.10Release notes
Sourced from mkdocs-material's releases.
... (truncated)
Changelog
Sourced from mkdocs-material's changelog.
... (truncated)
Commits
b688cfd
Updated changelogfea265d
Prepare 9.5.10 releaseadf061e
Updated dependencies7bbc9f9
Fixed positioning of integrated table of contents3e2a1fc
Merge branch 'master' of github.com:squidfunk/mkdocs-material2986aca
Documentation4fd52fd
Merge pull request #6791 from squidfunk/docs/updating-faq7922c8f
Updated FAQsf1673ec
Updated FAQse423784
Updated FAQsUpdates
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
frequenz-repo-config[lib]
from 0.8.0 to 0.9.0Release notes
Sourced from frequenz-repo-config[lib]'s releases.
... (truncated)
Commits
3e198ce
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.md0916f1b
Fetch submodules when doing cross-arch tests (#225)eb09fb4
Fetch submodules when doing cross-arch testse2bae45
Update pytest and sybil (#221)f479301
ci: Support using git for dependencies intest-installation
(#222)4b09189
Update release notes21067ad
Removemypy
exceptions forsybil
Updates
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)f53f422
Allow type ignores of PEP 695 constructs (#16608)7c33e7c
@final
class without bool cannot have falsey instances (#16566)c224da5
Do not intersect types in isinstance checks if at least one is final (#16330)d54cc35
Change example in test cases with no stubs available (#16513)eb1ee97
Update hashes insync-typeshed.py
following recent typeshed sync (#16600)344298e
Revert use ofParamSpec
forfunctools.wraps
3e5d813
Revert typeshed ctypes changeUpdates
types-markdown
from 3.4.2.10 to 3.5.0.20240129Commits
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)This includes an upgrade of repo-config, which requires manual changes (I mean, not technically, as it does work without them, but it would be good to keep in sync with the templates too). It looks like you only applied one of them. Can you maybe apply the rest?
https://github.com/frequenz-floss/frequenz-client-dispatch-python/pull/20