Bump mypy from 1.11.2 to 1.13.0
Bumps mypy from 1.11.2 to 1.13.0.
Changelog
Sourced from mypy's changelog.
Mypy Release Notes
Next release
Change to enum membership semantics
As per the updated typing specification for enums, enum members must be left unannotated.
class Pet(Enum): CAT = 1 # Member attribute DOG = 2 # Member attribute WOLF: int = 3 # New error: Enum members must be left unannotatedspecies: str # Considered a non-member attributeIn particular, the specification change can result in issues in type stubs (
.pyifiles), since historically it was common to leave the value absent:# In a type stub (.pyi file)class Pet(Enum):
# Change in semantics: previously considered members, now non-member attributes
CAT: int
DOG: int# Mypy will now issue a warning if it detects this situation in type stubs: # > Detected enum "Pet" in a type stub with zero members. # > There is a chance this is due to a recent change in the semantics of enum membership. # > If so, use `member = value` to mark an enum member, instead of `member: type`class Pet(Enum):
# As per the specification, you should now do one of the following:
DOG = 1 # Member attribute with value 1 and known type
WOLF = cast(int, ...) # Member attribute with unknown value but known type
LION = ... # Member attribute with unknown value and unknown type
Contributed by Terence Honles in PR 17207 and Shantanu Jain in PR 18068.
Mypy 1.13
We’ve just uploaded mypy 1.13 to the Python Package Index (PyPI). Mypy is a static type checker for Python. You can install it as follows:
python3 -m pip install -U mypy
... (truncated)
Commits
eb31034Bump version to 1.13.02eeb588Update changelog for 1.12.1 (#17999)bc0386bChangelog for 1.13 (#18000)5c4d2dbAdd faster-cache extra, test in CI (#17978)854ad18Make is_sub_path faster (#17962)50aa4caSpeed up stubs suggestions (#17965)7c27808Use orjson instead of json, when available (#17955)2cd2406Use fast path in modulefinder more often (#17950)e20aaeeLet mypyc optimise os.path.join (#17949)159974cUse sha1 for hashing (#17953)- Additional commits viewable in compare view
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 rebasewill rebase this PR -
@dependabot recreatewill recreate this PR, overwriting any edits that have been made to it -
@dependabot mergewill merge this PR after your CI passes on it -
@dependabot squash and mergewill squash and merge this PR after your CI passes on it -
@dependabot cancel mergewill cancel a previously requested merge and block automerging -
@dependabot reopenwill reopen this PR if it is closed -
@dependabot closewill close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually -
@dependabot show <dependency name> ignore conditionswill show all of the ignore conditions of the specified dependency -
@dependabot ignore this major versionwill close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) -
@dependabot ignore this minor versionwill close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) -
@dependabot ignore this dependencywill close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)