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)
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency
- `@dependabot ignore major version` will close this group update PR and stop Dependabot creating any more for the specific dependency's major version (unless you unignore this specific dependency's major version or upgrade to it yourself)
- `@dependabot ignore minor version` will close this group update PR and stop Dependabot creating any more for the specific dependency's minor version (unless you unignore this specific dependency's minor version or upgrade to it yourself)
- `@dependabot ignore ` will close this group update PR and stop Dependabot creating any more for the specific dependency (unless you unignore this specific dependency or upgrade to it yourself)
- `@dependabot unignore ` will remove all of the ignore conditions of the specified dependency
- `@dependabot unignore ` will remove the ignore condition of the specified dependency and ignore conditions
Bumps the optional group with 3 updates: black, mkdocs-material and mypy.
Updates
black
from 23.12.0 to 23.12.1Release notes
Sourced from black's releases.
Changelog
Sourced from black's changelog.
Commits
ec91a2b
Prepare release 23.12.1 (#4124)8fec1c3
Adds paren to deps for hidden extra constraint (#4108)35ce37d
Add new changelog templateUpdates
mkdocs-material
from 9.5.2 to 9.5.3Release notes
Sourced from mkdocs-material's releases.
Changelog
Sourced from mkdocs-material's changelog.
... (truncated)
Commits
ae1c63d
Updated Insiders changelog284264a
Prepare 9.5.3 release6b690e9
Documentation (#6549)175df61
Updated distribution files6a2b62b
Removed unnecessary quotes from type annotation (#6540)9956bf1
Replaced mutable argument default byNone
(#6541)0559666
Updated dependencies13aa156
Formatting (#6533)55fe1cc
Improved Group plugin initialization for mike (#6534)6e0b497
Documentation (#6519)Updates
mypy
from 1.7.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 changeDependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase
.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show