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
You can read the full documentation for this release on Read the Docs.
Note that unlike typical releases, Mypy 1.13 does not have any changes to type checking semantics
from 1.12.1.
Improved performance
Mypy 1.13 contains several performance improvements. Users can expect mypy to be 5-20% faster.
In environments with long search paths (such as environments using many editable installs), mypy
can be significantly faster, e.g. 2.2x faster in the use case targeted by these improvements.
Mypy 1.13 allows use of the orjson library for handling the cache instead of the stdlib json,
for improved performance. You can ensure the presence of orjson using the faster-cache extra:
python3 -m pip install -U mypy[faster-cache]
Mypy may depend on orjson by default in the future.
These improvements were contributed by Shantanu.
List of changes:
Significantly speed up file handling error paths (Shantanu, PR 17920)
Use fast path in modulefinder more often (Shantanu, PR 17950)
Let mypyc optimise os.path.join (Shantanu, PR 17949)
Fix E221 and E222 to flag missing or extra whitespace around == operator (#13890)
Formatter: Alternate quotes for strings inside f-strings in preview (#13860)
Formatter: Join implicit concatenated strings when they fit on a line (#13663)
[pylint] Restrict iteration-over-set to only work on sets of literals (PLC0208) (#13731)
Rule changes
[flake8-type-checking] Support auto-quoting when annotations contain quotes (#11811)
Server
Avoid indexing the workspace for single-file mode (#13770)
Bug fixes
Make ARG002 compatible with EM101 when raising NotImplementedError (#13714)
Other changes
Introduce more Docker tags for Ruff (similar to uv) (#13274)
0.7.0
Check out the blog post for a migration guide and overview of the changes!
Breaking changes
The pytest rules PT001 and PT023 now default to omitting the decorator parentheses when there are no arguments
(#12838, #13292).
This was a change that we attempted to make in Ruff v0.6.0, but only partially made due to an error on our part.
See the blog post for more details.
The useless-try-except rule (in our tryceratops category) has been recoded from TRY302 to
TRY203 (#13502). This ensures Ruff's code is consistent with
the same rule in the tryceratops linter.
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 dependencies group with 4 updates in the /misc/qt-updater directory: mypy, ruamel-yaml-clib, ruff and types-requests.
Updates
mypy
from 1.11.2 to 1.13.0Changelog
Sourced from mypy's changelog.
... (truncated)
Commits
eb31034
Bump version to 1.13.02eeb588
Update changelog for 1.12.1 (#17999)bc0386b
Changelog for 1.13 (#18000)5c4d2db
Add faster-cache extra, test in CI (#17978)854ad18
Make is_sub_path faster (#17962)50aa4ca
Speed up stubs suggestions (#17965)7c27808
Use orjson instead of json, when available (#17955)2cd2406
Use fast path in modulefinder more often (#17950)e20aaee
Let mypyc optimise os.path.join (#17949)159974c
Use sha1 for hashing (#17953)Updates
ruamel-yaml-clib
from 0.2.8 to 0.2.12Updates
ruff
from 0.6.9 to 0.7.1Release notes
Sourced from ruff's releases.
... (truncated)
Changelog
Sourced from ruff's changelog.
... (truncated)
Commits
337af83
Bump version to 0.7.1 (#13913)113ce84
Fixnormalize
arguments whenfstring_formatting
is disabled (#13910)7272f83
Fix preview style name incan_omit_parentheses
to is_f_string_formatting_en...3eb4546
[red-knot] Format mdtest Python snippets more concisely (#13905)77ae0cc
[red-knot] Infer subscript expression types for bytes literals (#13901)73ee72b
Join implicit concatenated strings when they fit on a line (#13663)e402e27
Use referencial equality intraversal
helper methods (#13895)de4181d
Remove "default" remark fromruff check
(#13900)2c57c2d
[red-knot] Type narrowing forisinstance
checks (#13894)72c18c8
Fix E221 and E222 to flag missing or extra whitespace around==
operator (#...Updates
types-requests
from 2.32.0.20240914 to 2.32.0.20241016Commits
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