Update dependency mypy to v1.18.2 #114
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "renovate/mypy-1.x"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This PR contains the following updates:
==1.8.0->==1.18.2Release Notes
python/mypy (mypy)
v1.18.2Compare Source
object.__init__(Stephen Morton, PR 19733)v1.18.1Compare Source
We’ve just uploaded mypy 1.18.1 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:
You can read the full documentation for this release on Read the Docs.
Mypy Performance Improvements
Mypy 1.18.1 includes numerous performance improvements, resulting in about 40% speedup
compared to 1.17 when type checking mypy itself. In extreme cases, the improvement
can be 10x or higher. The list below is an overview of the various mypy optimizations.
Many mypyc improvements (discussed in a separate section below) also improve performance.
Type caching optimizations have a small risk of causing regressions. When
reporting issues with unexpected inferred types, please also check if
--disable-expression-cachewill work around the issue, as it turns off some ofthese optimizations.
Fixed‑Format Cache (Experimental)
Mypy now supports a new cache format used for faster incremental builds. It makes
incremental builds up to twice as fast. The feature is experimental and
currently only supported when using a compiled version of mypy. Use
--fixed-format-cacheto enable the new format, or
fixed_format_cache = Truein a configuration file.We plan to enable this by default in a future mypy release, and we'll eventually
deprecate and remove support for the original JSON-based format.
Unlike the JSON-based cache format, the new binary format is currently
not easy to parse and inspect by mypy users. We are planning to provide a tool to
convert fixed-format cache files to JSON, but details of the output JSON may be
different from the current JSON format. If you rely on being able to inspect
mypy cache files, we recommend creating a GitHub issue and explaining your use
case, so that we can more likely provide support for it. (Using
MypyFile.read(binary_data)to inspect cache data may be sufficient to supportsome use cases.)
This feature was contributed by Ivan Levkivskyi (PR 19668, 19735, 19750, 19681, 19752, 19815).
Flexible Variable Definitions: Update
Mypy 1.16.0 introduced
--allow-redefinition-new, which allows redefining variableswith different types, and inferring union types for variables from multiple assignments.
The feature is now documented in the
--helpoutput, but the feature is still experimental.We are planning to enable this by default in mypy 2.0, and we will also deprecate the
older
--allow-redefinitionflag. Since the new behavior differs significantly fromthe older flag, we encourage users of
--allow-redefinitionto experiment with--allow-redefinition-newand create a GitHub issue if the new functionality doesn'tsupport some important use cases.
This feature was contributed by Jukka Lehtosalo.
Inferred Type for Bare ClassVar
A ClassVar without an explicit type annotation now causes the type of the variable
to be inferred from the initializer:
This feature was contributed by Ivan Levkivskyi (PR 19573).
Disjoint Base Classes (@disjoint_base, PEP 800)
Mypy now understands disjoint bases (PEP 800): it recognizes the
@disjoint_basedecorator, and rejects class definitions that combine mutually incompatible base classes,
and takes advantage of the fact that such classes cannot exist in reachability and
narrowing logic.
This class definition will now generate an error:
v1.17.1Compare Source
Noneas constraints bottom if no bottoms were provided (Stanislav Terliakov, PR 19485)hasattr" in dmypy (Stanislav Terliakov, PR 19428)v1.17.0Compare Source
v1.16.1Compare Source
v1.16.0Compare Source
v1.15.0Compare Source
v1.14.1Compare Source
v1.14.0Compare Source
v1.13.0Compare Source
v1.12.1Compare Source
os.pathstubs affecting use ofos.PathLike[Any](Shantanu, PR 17995)v1.12.0Compare Source
v1.11.2Compare Source
TypedDictitem types before storing (Ivan Levkivskyi, PR 17640)v1.11.1Compare Source
RawExpressionType.acceptcrash with--cache-fine-grained(Anders Kaseorg, PR 17588)typing.TypeAliasTypebeing undefined on python < 3.12 (Nikita Sobolev, PR 17558)types.GenericAliaslookup crash (Shantanu, PR 17543)v1.11.0Compare Source
v1.10.1Compare Source
v1.10.0Compare Source
v1.9.0Compare Source
Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR has been generated by Renovate Bot.
Update dependency mypy to v1.9.0to Update dependency mypy to v1.10.0dd54132d02to1b2cc569441b2cc56944to3c35f29386Update dependency mypy to v1.10.0to Update dependency mypy to v1.10.13c35f29386to5dc6680a36Update dependency mypy to v1.10.1to Update dependency mypy to v1.11.05dc6680a36to234aeb4b2aUpdate dependency mypy to v1.11.0to Update dependency mypy to v1.11.1234aeb4b2ato9c7c28e479Update dependency mypy to v1.11.1to Update dependency mypy to v1.11.2Update dependency mypy to v1.11.2to Update dependency mypy to v1.12.09c7c28e479toa4d0d924aaUpdate dependency mypy to v1.12.0to Update dependency mypy to v1.12.1a4d0d924aato73c7d12d00Update dependency mypy to v1.12.1to Update dependency mypy to v1.13.073c7d12d00to04ab32945404ab329454to9234536269Update dependency mypy to v1.13.0to Update dependency mypy to v1.14.0Update dependency mypy to v1.14.0to Update dependency mypy to v1.14.19234536269to6cac38b9686cac38b968tobc36129a1fUpdate dependency mypy to v1.14.1to Update dependency mypy to v1.15.0Update dependency mypy to v1.15.0to Update dependency mypy to v1.16.0bc36129a1ftocf92150984Update dependency mypy to v1.16.0to Update dependency mypy to v1.16.1cf92150984tobbe315ed54bbe315ed54to70f48ff2b2Update dependency mypy to v1.16.1to Update dependency mypy to v1.17.070f48ff2b2tod829455df8Update dependency mypy to v1.17.0to Update dependency mypy to v1.17.1d829455df8toce381d325eUpdate dependency mypy to v1.17.1to Update dependency mypy to v1.18.1ce381d325etob025c1a805Update dependency mypy to v1.18.1to Update dependency mypy to v1.18.2View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.