master
Commits on Feb 5, 2022
Commits on Feb 4, 2022
Commits on Feb 3, 2022
Commits on Feb 1, 2022
Commits on Jan 30, 2022
-
Fix "Implicit type aliases not recognised with PEP 604 + import cycle…
…s" (but only for stubs) (#11915)
Commits on Jan 28, 2022
-
Run self-check on Windows as part of CI (#11909)
As discussed in #11895, mypy's test suite currently does not pass a mypy self-check when run on Windows. This should hopefully be fixed by python/typeshed#6812, but running a self-check on Windows as part of the CI tests should help avoid this issue in the future.
-
-
Forbid extra
ParamSpec
arguments (#12024)* Forbid extra `ParamSpec` arguments * Change error message
-
Source commit: python/typeshed@9116b29 * Fix self check * update testDictWithStarStarSpecialCase * update testTypedDictMappingMethods * xfail testAsyncioGatherPreciseType Co-authored-by: hauntsaninja <>
Commits on Jan 27, 2022
-
-
-
Fix error in
exclude
section (#12078)Brings INI and TOML examples in line as noted.
Commits on Jan 26, 2022
-
Fix crash involving explicit any flag and Required (#12039)
Co-authored-by: Mehdi Drissi <mdrissi@snapchat.com>
Commits on Jan 25, 2022
-
Add note about wrong error code in type: ignore (#12067)
If we change the error code of a message, it can result in existing "type: ignore" comments being ignored. If this seems to be the case, add a note that hints about changing the ignored error code. Give a more specific message for a set of special cased error codes where we know the original error code. In other cases give a more vague message.
-
-
Simplify unions when erasing last known values (#12064)
When we erase last known values in an union with multiple Instance types, make sure that the resulting union doesn't have duplicate erased types. The duplicate items weren't incorrect as such, but they could cause overly complex error messages and potentially slow type checking performance. This is one of the fixes extracted from #12054. Since some of the changes may cause regressions, it's better to split the PR. Work on #12051. Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
Commits on Jan 24, 2022
-
Explain generic
Protocol[T1, T2, ...]
shorthand in Mypy docs (#12047)As far as I can tell, the nugget exposed by this commit lives only in PEP 544. This copies that nugget closer to where it is likely to be spotted by the intended audience. PEPs may not be accessible to customers who reasonably expect relevant information to be surfaced in featured documentation. Even if customers are aware of PEPs, they may not think to look there, and don't likely consider them primary sources. It is reasonable to assume that is the job of the docs, with PEPs capturing more esoteric nuances, rationales and other then-relevant details of decision-making, etc. It's also reasonable to expect that where further study may be helpful, links from relevant sections of primary sources to secondary materials like PEPs should exist. This commit fills in both gaps for the subject shorthand.
-
Fix crash with yield in comprehension (#12048)
Fixes #10189 Produce an error when encountering a yield expression (both `yield` and `yield from` clauses) in comprehensions and generator expressions. The latter is a syntax error in python 3.8+; see #10189 and also [python issue 10544](https://bugs.python.org/issue10544).
Commits on Jan 23, 2022
Commits on Jan 19, 2022
-
Fix self-check when targeting Python 3.10 (#12020)
This should fix wheel builds. Our CI always targets Python 3.6 when doing a self check, which means that we won't catch issues specific to more recent Python versions.
Commits on Jan 18, 2022
-
Fix handling of NoReturn in Union return types (#11996)
There are several discussions and comments describing the following problem (references can be found at the end of the PR summary): ```python def func() -> str | NoReturn: ... func().lower() ``` At the moment the code results in: `"NoReturn" of "Union[str, NoReturn]" has no attribute "lower"` Make `Union[int, NoReturn]` equivalent to `int` in a return type, because in case the function returns it must be `int`.
-
-
-
Commits on Jan 17, 2022
-
Fix __init__ in Dataclasses inheriting from Any (#11966)
Dataclasses that inherit from Any (actually another type that we don't know) should assume an (almost) arbitrary constructor. Fixes #11921
Commits on Jan 16, 2022
-
Clarify stub-only packages need to be installed (#9958)
* Clarify stub-only packages need to be installed * Add link to PEP 561