-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sync typeshed #15444
Sync typeshed #15444
Conversation
Source commit: python/typeshed@c38fc45
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)
Since the plugin provides superior type checking: python#13987 (comment) A manual cherry-pick of e437cdf.
Diff from mypy_primer, showing the effect of this PR on open source code: koda-validate (https://github.com/keithasaurus/koda-validate)
+ koda_validate/namedtuple.py:207: error: No overload variant of "NamedTuple" matches argument type "dict[Any, Any]" [call-overload]
+ koda_validate/namedtuple.py:207: note: Possible overload variants:
+ koda_validate/namedtuple.py:207: note: def __init__(self, str, Iterable[tuple[str, Any]], /) -> _NTT
+ koda_validate/namedtuple.py:207: note: def __init__(self, str, None = ..., /, **kwargs: Any) -> _NTT
+ koda_validate/namedtuple.py:258: error: No overload variant of "NamedTuple" matches argument type "dict[Any, Any]" [call-overload]
+ koda_validate/namedtuple.py:258: note: Possible overload variants:
+ koda_validate/namedtuple.py:258: note: def __init__(self, str, Iterable[tuple[str, Any]], /) -> _NTT
+ koda_validate/namedtuple.py:258: note: def __init__(self, str, None = ..., /, **kwargs: Any) -> _NTT
anyio (https://github.com/agronholm/anyio)
+ src/anyio/_core/_fileio.py:382: error: Unused "type: ignore" comment [unused-ignore]
pydantic (https://github.com/samuelcolvin/pydantic)
+ pydantic/v1/validators.py:614: error: No overload variant of "NamedTuple" matches argument type "dict[str, Any]" [call-overload]
+ pydantic/v1/validators.py:614: note: Possible overload variants:
+ pydantic/v1/validators.py:614: note: def __init__(self, str, Iterable[tuple[str, Any]], /) -> NamedTupleT
+ pydantic/v1/validators.py:614: note: def __init__(self, str, None = ..., /, **kwargs: Any) -> NamedTupleT
ibis (https://github.com/ibis-project/ibis)
+ ibis/common/egraph.py:111: error: Argument 1 of "__eq__" is incompatible with supertype "Mapping"; supertype defines the argument type as "object" [override]
streamlit (https://github.com/streamlit/streamlit)
- lib/tests/streamlit/connections/base_connection_test.py: note: In member "test_secrets_property_no_matching_section" of class "ExperimentalBaseConnectionDefaultMethodTests":
- lib/tests/streamlit/connections/base_connection_test.py:58:16: error: Non-overlapping equality check (left operand type: "AttrDict", right operand type: "Dict[<nothing>, <nothing>]") [comparison-overlap]
- lib/tests/streamlit/connections/base_connection_test.py: note: In member "test_secrets_property_no_secrets" of class "ExperimentalBaseConnectionDefaultMethodTests":
- lib/tests/streamlit/connections/base_connection_test.py:62:16: error: Non-overlapping equality check (left operand type: "AttrDict", right operand type: "Dict[<nothing>, <nothing>]") [comparison-overlap]
materialize (https://github.com/MaterializeInc/materialize)
+ misc/python/materialize/mzcompose/__init__.py:904: error: Signature of "parse_known_args" incompatible with supertype "ArgumentParser" [override]
+ misc/python/materialize/mzcompose/__init__.py:904: note: Superclass:
+ misc/python/materialize/mzcompose/__init__.py:904: note: @overload
+ misc/python/materialize/mzcompose/__init__.py:904: note: def parse_known_args(self, args: Optional[Sequence[str]] = ..., namespace: Optional[Namespace] = ...) -> tuple[Namespace, list[str]]
+ misc/python/materialize/mzcompose/__init__.py:904: note: @overload
+ misc/python/materialize/mzcompose/__init__.py:904: note: def [_N] parse_known_args(self, args: Optional[Sequence[str]], namespace: _N) -> tuple[_N, list[str]]
+ misc/python/materialize/mzcompose/__init__.py:904: note: @overload
+ misc/python/materialize/mzcompose/__init__.py:904: note: def [_N] parse_known_args(self, *, namespace: _N) -> tuple[_N, list[str]]
+ misc/python/materialize/mzcompose/__init__.py:904: note: Subclass:
+ misc/python/materialize/mzcompose/__init__.py:904: note: def parse_known_args(self, args: Optional[Sequence[str]] = ..., namespace: Optional[Namespace] = ...) -> tuple[Namespace, list[str]]
+ misc/python/materialize/cli/mzcompose.py:670: error: Signature of "parse_known_args" incompatible with supertype "ArgumentParser" [override]
+ misc/python/materialize/cli/mzcompose.py:670: note: Superclass:
+ misc/python/materialize/cli/mzcompose.py:670: note: @overload
+ misc/python/materialize/cli/mzcompose.py:670: note: def parse_known_args(self, args: Optional[Sequence[str]] = ..., namespace: Optional[Namespace] = ...) -> tuple[Namespace, list[str]]
+ misc/python/materialize/cli/mzcompose.py:670: note: @overload
+ misc/python/materialize/cli/mzcompose.py:670: note: def [_N] parse_known_args(self, args: Optional[Sequence[str]], namespace: _N) -> tuple[_N, list[str]]
+ misc/python/materialize/cli/mzcompose.py:670: note: @overload
+ misc/python/materialize/cli/mzcompose.py:670: note: def [_N] parse_known_args(self, *, namespace: _N) -> tuple[_N, list[str]]
+ misc/python/materialize/cli/mzcompose.py:670: note: Subclass:
+ misc/python/materialize/cli/mzcompose.py:670: note: def parse_known_args(self, args: Optional[Sequence[str]] = ..., namespace: Optional[Namespace] = ...) -> tuple[Namespace, list[str]]
+ misc/python/materialize/cli/mzcompose.py:681: error: Signature of "parse_known_args" incompatible with supertype "ArgumentParser" [override]
+ misc/python/materialize/cli/mzcompose.py:681: note: Superclass:
+ misc/python/materialize/cli/mzcompose.py:681: note: @overload
+ misc/python/materialize/cli/mzcompose.py:681: note: def parse_known_args(self, args: Optional[Sequence[str]] = ..., namespace: Optional[Namespace] = ...) -> tuple[Namespace, list[str]]
+ misc/python/materialize/cli/mzcompose.py:681: note: @overload
+ misc/python/materialize/cli/mzcompose.py:681: note: def [_N] parse_known_args(self, args: Optional[Sequence[str]], namespace: _N) -> tuple[_N, list[str]]
+ misc/python/materialize/cli/mzcompose.py:681: note: @overload
+ misc/python/materialize/cli/mzcompose.py:681: note: def [_N] parse_known_args(self, *, namespace: _N) -> tuple[_N, list[str]]
+ misc/python/materialize/cli/mzcompose.py:681: note: Subclass:
+ misc/python/materialize/cli/mzcompose.py:681: note: def parse_known_args(self, args: Optional[Sequence[str]] = ..., namespace: Optional[Namespace] = ...) -> tuple[Namespace, list[str]]
|
I don't know why the PEP-561 test is failing -- looks like it's also failing on |
Maybe setuptools or tox or something made a release that broke it? Opened #15446 to track. |
Source commit: python/typeshed@c38fc45
Changes in
builtins
andfunctools
caused the automated PR failed last night due to merge conflicts in the cherry-picks: https://github.com/python/mypy/actions/runs/5273276786