Originally created by: dependabot[bot]
⚠️ Dependabot is rebasing this PR ⚠️
Rebasing might not happen immediately, so don't worry if this takes some time.
Note: if you make any changes to this PR yourself, they will take precedence over the rebase.
Bumps the dev-tools group with 2 updates in the / directory: mypy and ruff.
Updates mypy from 2.3.0 to 2.3.1
Sourced from mypy's changelog.
Mypy 2.3.1
- Fix mypyc crash on double yielding Iterators (Daniël van Noord, PR 21826)
- Fix mypyc
default_factoryfor inherited dataclass (Daniël van Noord, PR 21785)- Clear mypyc coroutine env on coroutine completion (Piotr Sawicki, PR 21734)
- Fix crash when unpacking return value from overload (Shantanu, PR 21830)
Acknowledgements
Thanks to all mypy contributors who contributed to this release:
- Agriya Khetarpal
- Ethan Sarp
- Ivan Levkivskyi
- Jingchen Ye
- Jukka Lehtosalo
- Piotr Sawicki
- Shantanu
- Tom Bannink
- Viktor Szépe
- ygale
I'd also like to thank my employer, Dropbox, for supporting mypy development.
Mypy 2.2
We've just uploaded mypy 2.2.0 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 mypyYou can read the full documentation for this release on Read the Docs.
Support for Closed TypedDicts (PEP 728)
Mypy now supports closed TypedDicts as specified in PEP 728. A closed TypedDict cannot have extra keys beyond those explicitly defined. This allows the type checker to determine that certain operations are safe when they otherwise wouldn't be due to the potential presence of unknown keys.
You can use the
closedkeyword argument withTypedDict:HasName = TypedDict("HasName", {"name": str}) HasOnlyName = TypedDict("HasOnlyName", {"name": str}, closed=True) Movie = TypedDict("Movie", {"name": str, "year": int})
movie: Movie = {"name": "Nimona", "year": 2023} has_name: HasName = movie # OK: HasName is open (default) has_only_name: HasOnlyName = movie # Error: HasOnlyName is closed and Movie has extra "year" key </tr></table>
... (truncated)
d642c44 Bump version to 2.3.1a392429 [mypyc] Fix crash on double yielding Iterators (#21826](https://github.com/href="https://redirect.github.com/python/mypy/issues/21826">/issues/21826))4843e77 [mypyc] Fix default_factory for inherited dataclass (#21785](https://github.com/href="https://redirect.github.com/python/mypy/issues/21785">/issues/21785))14f5df9 [mypyc] Clear coroutine env on coroutine completion (#21734](https://github.com/href="https://redirect.github.com/python/mypy/issues/21734">/issues/21734))6dfa06d Fix crash when unpacking return value from overload (#21830](https://github.com/href="https://redirect.github.com/python/mypy/issues/21830">/issues/21830))a385746 Bump version to 2.3.1+devUpdates ruff from 0.16.1 to 0.16.3
Sourced from ruff's releases.
0.16.3
Release Notes
Released on 2026-08-13.
Preview features
- [
pylint] Fix false negatives on negative numbers (PLR6104) (#27251](https://github.com/href="https://redirect.github.com/astral-sh/ruff/pull/27251">/issues/27251))- [
pyupgrade] Add rule to replacewhile 1withwhile True(UP048) (#27190](https://github.com/href="https://redirect.github.com/astral-sh/ruff/pull/27190">/issues/27190))Bug fixes
- [
flake8-bandit] Also check keyword arguments (S602,S603,S607,S609) (#27687](https://github.com/href="https://redirect.github.com/astral-sh/ruff/pull/27687">/issues/27687))- [
pylint] Allowcontinueinfinallyon Python 3.8 (#27626](https://github.com/href="https://redirect.github.com/astral-sh/ruff/pull/27626">/issues/27626))- [
pylint] FixPLE1307false positive with bools (#27651](https://github.com/href="https://redirect.github.com/astral-sh/ruff/pull/27651">/issues/27651))- [
pylint] Fix false positives and negatives with%bformat character (PLE1300,PLE1307) (#27560](https://github.com/href="https://redirect.github.com/astral-sh/ruff/pull/27560">/issues/27560))- [
pylint] Improve handling of concatenated strings (PLE1300) (#27659](https://github.com/href="https://redirect.github.com/astral-sh/ruff/pull/27659">/issues/27659))Rule changes
- [
numpy] Makenp.chararrayautofix backwards-compatible (NPY201) (#27527](https://github.com/href="https://redirect.github.com/astral-sh/ruff/pull/27527">/issues/27527))Performance
- Enable PGO for Linux x86-64 Ruff releases (#27570](https://github.com/href="https://redirect.github.com/astral-sh/ruff/pull/27570">/issues/27570))
- Enable PGO for Linux ARM64 Ruff releases (#27574](https://github.com/href="https://redirect.github.com/astral-sh/ruff/pull/27574">/issues/27574))
- Enable PGO for Windows x86-64 Ruff releases (#27573](https://github.com/href="https://redirect.github.com/astral-sh/ruff/pull/27573">/issues/27573))
- Enable PGO for macOS ARM64 Ruff releases (#27572](https://github.com/href="https://redirect.github.com/astral-sh/ruff/pull/27572">/issues/27572))
- Reduce
Exprsize to 64 bytes (#27591](https://github.com/href="https://redirect.github.com/astral-sh/ruff/pull/27591">/issues/27591))CLI
- Hyperlink rule codes in
ruff check --statisticsoutput (#27646](https://github.com/href="https://redirect.github.com/astral-sh/ruff/pull/27646">/issues/27646))Documentation
- [
ruff] Also suggestasyncio.TaskGroup(RUF006) (#27461](https://github.com/href="https://redirect.github.com/astral-sh/ruff/pull/27461">/issues/27461))Other changes
- Use mimalloc v3 (#27586](https://github.com/href="https://redirect.github.com/astral-sh/ruff/pull/27586">/issues/27586))
Contributors
... (truncated)
Sourced from ruff's changelog.
0.16.3
Released on 2026-08-13.
Preview features
- [
pylint] Fix false negatives on negative numbers (PLR6104) (#27251](https://github.com/href="https://redirect.github.com/astral-sh/ruff/pull/27251">/issues/27251))- [
pyupgrade] Add rule to replacewhile 1withwhile True(UP048) (#27190](https://github.com/href="https://redirect.github.com/astral-sh/ruff/pull/27190">/issues/27190))Bug fixes
- [
flake8-bandit] Also check keyword arguments (S602,S603,S607,S609) (#27687](https://github.com/href="https://redirect.github.com/astral-sh/ruff/pull/27687">/issues/27687))- [
pylint] Allowcontinueinfinallyon Python 3.8 (#27626](https://github.com/href="https://redirect.github.com/astral-sh/ruff/pull/27626">/issues/27626))- [
pylint] FixPLE1307false positive with bools (#27651](https://github.com/href="https://redirect.github.com/astral-sh/ruff/pull/27651">/issues/27651))- [
pylint] Fix false positives and negatives with%bformat character (PLE1300,PLE1307) (#27560](https://github.com/href="https://redirect.github.com/astral-sh/ruff/pull/27560">/issues/27560))- [
pylint] Improve handling of concatenated strings (PLE1300) (#27659](https://github.com/href="https://redirect.github.com/astral-sh/ruff/pull/27659">/issues/27659))Rule changes
- [
numpy] Makenp.chararrayautofix backwards-compatible (NPY201) (#27527](https://github.com/href="https://redirect.github.com/astral-sh/ruff/pull/27527">/issues/27527))Performance
- Enable PGO for Linux x86-64 Ruff releases (#27570](https://github.com/href="https://redirect.github.com/astral-sh/ruff/pull/27570">/issues/27570))
- Enable PGO for Linux ARM64 Ruff releases (#27574](https://github.com/href="https://redirect.github.com/astral-sh/ruff/pull/27574">/issues/27574))
- Enable PGO for Windows x86-64 Ruff releases (#27573](https://github.com/href="https://redirect.github.com/astral-sh/ruff/pull/27573">/issues/27573))
- Enable PGO for macOS ARM64 Ruff releases (#27572](https://github.com/href="https://redirect.github.com/astral-sh/ruff/pull/27572">/issues/27572))
- Reduce
Exprsize to 64 bytes (#27591](https://github.com/href="https://redirect.github.com/astral-sh/ruff/pull/27591">/issues/27591))CLI
- Hyperlink rule codes in
ruff check --statisticsoutput (#27646](https://github.com/href="https://redirect.github.com/astral-sh/ruff/pull/27646">/issues/27646))Documentation
- [
ruff] Also suggestasyncio.TaskGroup(RUF006) (#27461](https://github.com/href="https://redirect.github.com/astral-sh/ruff/pull/27461">/issues/27461))Other changes
- Use mimalloc v3 (#27586](https://github.com/href="https://redirect.github.com/astral-sh/ruff/pull/27586">/issues/27586))
Contributors
... (truncated)
b0e4702 Bump 0.16.3 (#27723](https://github.com/href="https://redirect.github.com/astral-sh/ruff/issues/27723">/issues/27723))ecdd401 [ty] Separate script and uv modules from project metadata (#27720](https://github.com/href="https://redirect.github.com/astral-sh/ruff/issues/27720">/issues/27720))1263524 [ty] Simplify display implementations with std::fmt::from_fn (#27718](https://github.com/href="https://redirect.github.com/astral-sh/ruff/issues/27718">/issues/27718))59196ba [ty] Unify polarity-aware relation construction (#27707](https://github.com/href="https://redirect.github.com/astral-sh/ruff/issues/27707">/issues/27707))b8c5e73 [ty] Disable CodSpeed cycle estimation for instrumented benchmarks (#27706](https://github.com/href="https://redirect.github.com/astral-sh/ruff/issues/27706">/issues/27706))2b0d210 [ty] Centralize matched argument relations (#27705](https://github.com/href="https://redirect.github.com/astral-sh/ruff/issues/27705">/issues/27705))a9130f3 [pyupgrade] Add rule to replace while 1 with while True (while-one, `...c64c7d6 [ty] Model try exception flow with operation checkpoints (#27471](https://github.com/href="https://redirect.github.com/astral-sh/ruff/issues/27471">/issues/27471))9dea5ef [ty] Avoid deriving sequents for typevars with concrete bounds (#27587](https://github.com/href="https://redirect.github.com/astral-sh/ruff/issues/27587">/issues/27587))9798e88 [ty] Preserve enum exhaustiveness with custom missing methods (#27700](https://github.com/href="https://redirect.github.com/astral-sh/ruff/issues/27700">/issues/27700))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.