python-fsutil
python-fsutil copied to clipboard
Update mypy requirement from ==1.15.* to ==1.16.*
Updates the requirements on mypy to permit the latest version.
Changelog
Sourced from mypy's changelog.
Mypy Release Notes
Next Release
Mypy 1.16
We’ve just uploaded mypy 1.16 to the Python Package Index (PyPI). Mypy is a static type checker for Python. This release includes new features and bug fixes. You can install it as follows:
python3 -m pip install -U mypyYou can read the full documentation for this release on Read the Docs.
Different Property Getter and Setter Types
Mypy now supports using different types for a property getter and setter:
class A: _value: int@property def foo(self) -> int: return self._value@foo.setter def foo(self, x: str | int) -> None: try: self._value = int(x) except ValueError: raise Exception(f"'{x}' is not a valid value for 'foo'")
This was contributed by Ivan Levkivskyi (PR 18510).
Flexible Variable Redefinitions (Experimental)
Mypy now allows unannotated variables to be freely redefined with different types when using the experimental
--allow-redefinition-newflag. You will also need to enable--local-partial-types. Mypy will now infer a union type when different types are assigned to a variable:# mypy: allow-redefinition-new, local-partial-typesdef f(n: int, b: bool) -> int | str: if b: x = n else: </tr></table>
... (truncated)
Commits
9e72e96Update version to 1.16.08fe719fAdd changelog for 1.16 (#19138)2a036e7Revert "Infer correct types with overloads ofType[Guard | Is](#19161)b6da4fcAllow enum members to have type objects as values (#19160)334469f[mypyc] Improve documentation of native and non-native classes (#19154)a499d9fDocument --allow-redefinition-new (#19153)96525a2Merge commit '9e45dadcf6d8dbab36f83d9df94a706c0b4f9207' into release-1.169e45dadClear more data in TypeChecker.reset() instead of asserting (#19087)772cd0cAdd --strict-bytes to --strict (#19049)0b65f21Admit that Final variables are never redefined (#19083)- 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)