Skip to content

Sync typeshed#20932

Open
github-actions[bot] wants to merge 9 commits intomasterfrom
mypybot/sync-typeshed
Open

Sync typeshed#20932
github-actions[bot] wants to merge 9 commits intomasterfrom
mypybot/sync-typeshed

Conversation

@github-actions
Copy link
Contributor

@github-actions github-actions bot commented Mar 1, 2026

Sync typeshed

Source commit:
python/typeshed@843c1fd

Note that you will need to close and re-open the PR in order to trigger CI.

mypybot and others added 9 commits March 1, 2026 00:10
This is allegedly causing large performance problems, see 13821

typeshed/8231 had zero hits on mypy_primer, so it's not the worst thing
to undo. Patching this in typeshed also feels weird, since there's a
more general soundness issue. If a typevar has a bound or constraint, we
might not want to solve it to a Literal.

If we can confirm the performance regression or fix the unsoundness
within mypy, I might pursue upstreaming this in typeshed.

(Reminder: add this to the sync_typeshed script once merged)
The plugin provides superior type checking:
#13987 (comment)
A manual cherry-pick of e437cdf.
@github-actions
Copy link
Contributor Author

github-actions bot commented Mar 1, 2026

Diff from mypy_primer, showing the effect of this PR on open source code:

pydantic (https://github.com/pydantic/pydantic)
- pydantic/_internal/_model_construction.py:308: error: Incompatible types in assignment (expression has type "Callable[[Any], bool]", base class "ABCMeta" defined the type as "def __instancecheck__(cls, instance: Any) -> bool")  [assignment]
- pydantic/_internal/_model_construction.py:309: error: Incompatible types in assignment (expression has type "Callable[[type], bool]", base class "ABCMeta" defined the type as "def __subclasscheck__(cls, subclass: type) -> bool")  [assignment]

jax (https://github.com/google/jax)
+ jax/_src/util.py:797: error: Unused "type: ignore" comment  [unused-ignore]
+ jax/_src/util.py:798: error: Unused "type: ignore" comment  [unused-ignore]

cwltool (https://github.com/common-workflow-language/cwltool)
+ cwltool/update.py: note: In function "v1_2to1_3dev1":
+ cwltool/update.py:55:25: error: Unexpected keyword argument "index" for "pop" of "MutableSequence"  [call-arg]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants