| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
cleanup fix param spec tuple interaction fix self check more cleanup use Unpack for 3.9 / 3.10 tests fixed crash in overload with multiple rvalues fixed basic tuple expression round trip fix bad paramspec interaction with typevartuple reworked star argument checking
Open Problems
|
Sorry, something went wrong.
|
Diff from mypy_primer, showing the effect of this PR on open source code: beartype (https://github.com/beartype/beartype)
+ beartype/_util/hint/pep/proposal/pep646692.py:418: error: Unused "type: ignore" comment [unused-ignore]
spack (https://github.com/spack/spack)
+ lib/spack/spack/version/version_types.py:134: error: Incompatible types in assignment (expression has type "tuple[str, ...]", variable has type "tuple[str]") [assignment]
hydpy (https://github.com/hydpy-dev/hydpy)
+ hydpy/core/selectiontools.py:370: error: Argument 1 to "intersection" of "Devices" has incompatible type "*Elements"; expected "Elements" [arg-type]
+ hydpy/core/pubtools.py:163: error: Argument 1 to "Timegrids" has incompatible type "*Timegrids | Timegrid | tuple[datetime | str | Date, datetime | str | Date, timedelta | str | Period]"; expected "Timegrid" [arg-type]
+ hydpy/core/pubtools.py:163: error: Argument 1 to "Timegrids" has incompatible type "*Timegrids | Timegrid | tuple[datetime | str | Date, datetime | str | Date, timedelta | str | Period]"; expected "Timegrid | None" [arg-type]
spark (https://github.com/apache/spark)
+ python/pyspark/sql/profiler.py:261: error: Incompatible types in assignment (expression has type "tuple[None, dict[str, list[tuple[int, tuple[float, float, int] | None]]] | None, *tuple[Any, ...]]", target has type "tuple[Stats | None, dict[str, list[tuple[int, tuple[float, float, int] | None]]] | None]") [assignment]
+ python/pyspark/sql/profiler.py:266: error: Incompatible types in assignment (expression has type "tuple[None, dict[str, list[tuple[int, tuple[float, float, int] | None]]] | None, *tuple[Any, ...]]", target has type "tuple[Stats | None, dict[str, list[tuple[int, tuple[float, float, int] | None]]] | None]") [assignment]
+ python/pyspark/sql/profiler.py:286: error: Incompatible types in assignment (expression has type "tuple[Stats | None, None, *tuple[Any, ...]]", target has type "tuple[Stats | None, dict[str, list[tuple[int, tuple[float, float, int] | None]]] | None]") [assignment]
+ python/pyspark/sql/profiler.py:291: error: Incompatible types in assignment (expression has type "tuple[Stats | None, None, *tuple[Any, ...]]", target has type "tuple[Stats | None, dict[str, list[tuple[int, tuple[float, float, int] | None]]] | None]") [assignment]
tornado (https://github.com/tornadoweb/tornado)
+ tornado/routing.py:355: error: Argument 2 to "Rule" has incompatible type "*list[Any] | tuple[Any] | tuple[Any, dict[str, Any]] | tuple[Any, dict[str, Any], str]"; expected "dict[str, Any] | None" [arg-type]
+ tornado/routing.py:355: error: Argument 2 to "Rule" has incompatible type "*list[Any] | tuple[Any] | tuple[Any, dict[str, Any]] | tuple[Any, dict[str, Any], str]"; expected "str | None" [arg-type]
+ tornado/routing.py:357: error: Argument 1 to "Rule" has incompatible type "*list[Any] | tuple[str | Matcher, Any] | tuple[str | Matcher, Any, dict[str, Any]] | tuple[str | Matcher, Any, dict[str, Any], str]"; expected "Matcher" [arg-type]
+ tornado/routing.py:357: error: Argument 1 to "Rule" has incompatible type "*list[Any] | tuple[str | Matcher, Any] | tuple[str | Matcher, Any, dict[str, Any]] | tuple[str | Matcher, Any, dict[str, Any], str]"; expected "dict[str, Any] | None" [arg-type]
+ tornado/routing.py:357: error: Argument 1 to "Rule" has incompatible type "*list[Any] | tuple[str | Matcher, Any] | tuple[str | Matcher, Any, dict[str, Any]] | tuple[str | Matcher, Any, dict[str, Any], str]"; expected "str | None" [arg-type]
mongo-python-driver (https://github.com/mongodb/mongo-python-driver)
+ bson/__init__.py:1332: error: Incompatible types in "yield" (actual type "Mapping[str, Any]", expected type "dict[str, Any] | _DocumentType") [misc]
+ bson/__init__.py:1378: error: Argument 2 to "_bson_to_dict" has incompatible type "CodecOptions[_DocumentType] | CodecOptions[dict[str, Any]]"; expected "CodecOptions[Mapping[str, Any]]" [arg-type]
+ bson/__init__.py:1378: note: Error code "arg-type" not covered by "type: ignore" comment
+ pymongo/network_layer.py:107: error: Exception type must be derived from BaseException (or be a tuple of exception classes) [misc]
+ pymongo/network_layer.py:156: error: Exception type must be derived from BaseException (or be a tuple of exception classes) [misc]
+ pymongo/network_layer.py:354: error: Exception type must be derived from BaseException (or be a tuple of exception classes) [misc]
- pymongo/synchronous/topology.py:1077: error: No overload variant of "gather" matches argument types "list[None]", "bool" [call-overload]
+ pymongo/synchronous/topology.py:1077: error: Argument 1 to "gather" has incompatible type "*list[None]"; expected "Future[Never] | Awaitable[Never]" [arg-type]
- pymongo/synchronous/topology.py:1077: note: Error code "call-overload" not covered by "type: ignore" comment
+ pymongo/synchronous/topology.py:1077: note: Error code "arg-type" not covered by "type: ignore" comment
- pymongo/synchronous/topology.py:1077: note: Possible overload variants:
- pymongo/synchronous/topology.py:1077: note: def [_T1] gather(Future[_T1] | Awaitable[_T1], /, *, return_exceptions: Literal[False] = ...) -> Future[tuple[_T1]]
- pymongo/synchronous/topology.py:1077: note: def [_T1, _T2] gather(Future[_T1] | Awaitable[_T1], Future[_T2] | Awaitable[_T2], /, *, return_exceptions: Literal[False] = ...) -> Future[tuple[_T1, _T2]]
- pymongo/synchronous/topology.py:1077: note: def [_T1, _T2, _T3] gather(Future[_T1] | Awaitable[_T1], Future[_T2] | Awaitable[_T2], Future[_T3] | Awaitable[_T3], /, *, return_exceptions: Literal[False] = ...) -> Future[tuple[_T1, _T2, _T3]]
- pymongo/synchronous/topology.py:1077: note: def [_T1, _T2, _T3, _T4] gather(Future[_T1] | Awaitable[_T1], Future[_T2] | Awaitable[_T2], Future[_T3] | Awaitable[_T3], Future[_T4] | Awaitable[_T4], /, *, return_exceptions: Literal[False] = ...) -> Future[tuple[_T1, _T2, _T3, _T4]]
- pymongo/synchronous/topology.py:1077: note: def [_T1, _T2, _T3, _T4, _T5] gather(Future[_T1] | Awaitable[_T1], Future[_T2] | Awaitable[_T2], Future[_T3] | Awaitable[_T3], Future[_T4] | Awaitable[_T4], Future[_T5] | Awaitable[_T5], /, *, return_exceptions: Literal[False] = ...) -> Future[tuple[_T1, _T2, _T3, _T4, _T5]]
- pymongo/synchronous/topology.py:1077: note: def [_T1, _T2, _T3, _T4, _T5, _T6] gather(Future[_T1] | Awaitable[_T1], Future[_T2] | Awaitable[_T2], Future[_T3] | Awaitable[_T3], Future[_T4] | Awaitable[_T4], Future[_T5] | Awaitable[_T5], Future[_T6] | Awaitable[_T6], /, *, return_exceptions: Literal[False] = ...) -> Future[tuple[_T1, _T2, _T3, _T4, _T5, _T6]]
- pymongo/synchronous/topology.py:1077: note: def [_T] gather(*coros_or_futures: Future[_T] | Awaitable[_T], return_exceptions: Literal[False] = ...) -> Future[list[_T]]
- pymongo/synchronous/topology.py:1077: note: def [_T1] gather(Future[_T1] | Awaitable[_T1], /, *, return_exceptions: bool) -> Future[tuple[_T1 | BaseException]]
- pymongo/synchronous/topology.py:1077: note: def [_T1, _T2] gather(Future[_T1] | Awaitable[_T1], Future[_T2] | Awaitable[_T2], /, *, return_exceptions: bool) -> Future[tuple[_T1 | BaseException, _T2 | BaseException]]
- pymongo/synchronous/topology.py:1077: note: def [_T1, _T2, _T3] gather(Future[_T1] | Awaitable[_T1], Future[_T2] | Awaitable[_T2], Future[_T3] | Awaitable[_T3], /, *, return_exceptions: bool) -> Future[tuple[_T1 | BaseException, _T2 | BaseException, _T3 | BaseException]]
- pymongo/synchronous/topology.py:1077: note: def [_T1, _T2, _T3, _T4] gather(Future[_T1] | Awaitable[_T1], Future[_T2] | Awaitable[_T2], Future[_T3] | Awaitable[_T3], Future[_T4] | Awaitable[_T4], /, *, return_exceptions: bool) -> Future[tuple[_T1 | BaseException, _T2 | BaseException, _T3 | BaseException, _T4 | BaseException]]
- pymongo/synchronous/topology.py:1077: note: def [_T1, _T2, _T3, _T4, _T5] gather(Future[_T1] | Awaitable[_T1], Future[_T2] | Awaitable[_T2], Future[_T3] | Awaitable[_T3], Future[_T4] | Awaitable[_T4], Future[_T5] | Awaitable[_T5], /, *, return_exceptions: bool) -> Future[tuple[_T1 | BaseException, _T2 | BaseException, _T3 | BaseException, _T4 | BaseException, _T5 | BaseException]]
- pymongo/synchronous/topology.py:1077: note: def [_T1, _T2, _T3, _T4, _T5, _T6] gather(Future[_T1] | Awaitable[_T1], Future[_T2] | Awaitable[_T2], Future[_T3] | Awaitable[_T3], Future[_T4] | Awaitable[_T4], Future[_T5] | Awaitable[_T5], Future[_T6] | Awaitable[_T6], /, *, return_exceptions: bool) -> Future[tuple[_T1 | BaseException, _T2 | BaseException, _T3 | BaseException, _T4 | BaseException, _T5 | BaseException, _T6 | BaseException]]
- pymongo/synchronous/topology.py:1077: note: def [_T] gather(*coros_or_futures: Future[_T] | Awaitable[_T], return_exceptions: bool) -> Future[list[_T | BaseException]]
+ pymongo/synchronous/pool.py:849: error: Argument 1 to "gather" has incompatible type "*list[None]"; expected "Future[Never] | Awaitable[Never]" [arg-type]
+ pymongo/synchronous/pool.py:849: note: Error code "arg-type" not covered by "type: ignore" comment
+ pymongo/synchronous/pool.py:886: error: Argument 1 to "gather" has incompatible type "*list[None]"; expected "Future[Never] | Awaitable[Never]" [arg-type]
+ pymongo/synchronous/pool.py:886: note: Error code "arg-type" not covered by "type: ignore" comment
+ pymongo/synchronous/pool.py:937: error: Argument 1 to "gather" has incompatible type "*list[None]"; expected "Future[Never] | Awaitable[Never]" [arg-type]
+ pymongo/synchronous/pool.py:937: note: Error code "arg-type" not covered by "type: ignore" comment
- pymongo/synchronous/pool.py:848: error: No overload variant of "gather" matches argument types "list[None]", "bool" [call-overload]
- pymongo/synchronous/pool.py:848: note: Possible overload variants:
- pymongo/synchronous/pool.py:848: note: def [_T1] gather(Future[_T1] | Awaitable[_T1], /, *, return_exceptions: Literal[False] = ...) -> Future[tuple[_T1]]
- pymongo/synchronous/pool.py:848: note: def [_T1, _T2] gather(Future[_T1] | Awaitable[_T1], Future[_T2] | Awaitable[_T2], /, *, return_exceptions: Literal[False] = ...) -> Future[tuple[_T1, _T2]]
- pymongo/synchronous/pool.py:848: note: def [_T1, _T2, _T3] gather(Future[_T1] | Awaitable[_T1], Future[_T2] | Awaitable[_T2], Future[_T3] | Awaitable[_T3], /, *, return_exceptions: Literal[False] = ...) -> Future[tuple[_T1, _T2, _T3]]
- pymongo/synchronous/pool.py:848: note: def [_T1, _T2, _T3, _T4] gather(Future[_T1] | Awaitable[_T1], Future[_T2] | Awaitable[_T2], Future[_T3] | Awaitable[_T3], Future[_T4] | Awaitable[_T4], /, *, return_exceptions: Literal[False] = ...) -> Future[tuple[_T1, _T2, _T3, _T4]]
- pymongo/synchronous/pool.py:848: note: def [_T1, _T2, _T3, _T4, _T5] gather(Future[_T1] | Awaitable[_T1], Future[_T2] | Awaitable[_T2], Future[_T3] | Awaitable[_T3], Future[_T4] | Awaitable[_T4], Future[_T5] | Awaitable[_T5], /, *, return_exceptions: Literal[False] = ...) -> Future[tuple[_T1, _T2, _T3, _T4, _T5]]
- pymongo/synchronous/pool.py:848: note: def [_T1, _T2, _T3, _T4, _T5, _T6] gather(Future[_T1] | Awaitable[_T1], Future[_T2] | Awaitable[_T2], Future[_T3] | Awaitable[_T3], Future[_T4] | Awaitable[_T4], Future[_T5] | Awaitable[_T5], Future[_T6] | Awaitable[_T6], /, *, return_exceptions: Literal[False] = ...) -> Future[tuple[_T1, _T2, _T3, _T4, _T5, _T6]]
- pymongo/synchronous/pool.py:848: note: def [_T] gather(*coros_or_futures: Future[_T] | Awaitable[_T], return_exceptions: Literal[False] = ...) -> Future[list[_T]]
- pymongo/synchronous/pool.py:848: note: def [_T1] gather(Future[_T1] | Awaitable[_T1], /, *, return_exceptions: bool) -> Future[tuple[_T1 | BaseException]]
- pymongo/synchronous/pool.py:848: note: def [_T1, _T2] gather(Future[_T1] | Awaitable[_T1], Future[_T2] | Awaitable[_T2], /, *, return_exceptions: bool) -> Future[tuple[_T1 | BaseException, _T2 | BaseException]]
- pymongo/synchronous/pool.py:848: note: def [_T1, _T2, _T3] gather(Future[_T1] | Awaitable[_T1], Future[_T2] | Awaitable[_T2], Future[_T3] | Awaitable[_T3], /, *, return_exceptions: bool) -> Future[tuple[_T1 | BaseException, _T2 | BaseException, _T3 | BaseException]]
- pymongo/synchronous/pool.py:848: note: def [_T1, _T2, _T3, _T4] gather(Future[_T1] | Awaitable[_T1], Future[_T2] | Awaitable[_T2], Future[_T3] | Awaitable[_T3], Future[_T4] | Awaitable[_T4], /, *, return_exceptions: bool) -> Future[tuple[_T1 | BaseException, _T2 | BaseException, _T3 | BaseException, _T4 | BaseException]]
- pymongo/synchronous/pool.py:848: note: def [_T1, _T2, _T3, _T4, _T5] gather(Future[_T1] | Awaitable[_T1], Future[_T2] | Awaitable[_T2], Future[_T3] | Awaitable[_T3], Future[_T4] | Awaitable[_T4], Future[_T5] | Awaitable[_T5], /, *, return_exceptions: bool) -> Future[tuple[_T1 | BaseException, _T2 | BaseException, _T3 | BaseException, _T4 | BaseException, _T5 | BaseException]]
- pymongo/synchronous/pool.py:848: note: def [_T1, _T2, _T3, _T4, _T5, _T6] gather(Future[_T1] | Awaitable[_T1], Future[_T2] | Awaitable[_T2], Future[_T3] | Awaitable[_T3], Future[_T4] | Awaitable[_T4], Future[_T5] | Awaitable[_T5], Future[_T6] | Awaitable[_T6], /, *, return_exceptions: bool) -> Future[tuple[_T1 | BaseException, _T2 | BaseException, _T3 | BaseException, _T4 | BaseException, _T5 | BaseException, _T6 | BaseException]]
- pymongo/synchronous/pool.py:848: note: def [_T] gather(*coros_or_futures: Future[_T] | Awaitable[_T], return_exceptions: bool) -> Future[list[_T | BaseException]]
- pymongo/synchronous/pool.py:885: error: No overload variant of "gather" matches argument types "list[None]", "bool" [call-overload]
- pymongo/synchronous/pool.py:885: note: Possible overload variants:
- pymongo/synchronous/pool.py:885: note: def [_T1] gather(Future[_T1] | Awaitable[_T1], /, *, return_exceptions: Literal[False] = ...) -> Future[tuple[_T1]]
- pymongo/synchronous/pool.py:885: note: def [_T1, _T2] gather(Future[_T1] | Awaitable[_T1], Future[_T2] | Awaitable[_T2], /, *, return_exceptions: Literal[False] = ...) -> Future[tuple[_T1, _T2]]
- pymongo/synchronous/pool.py:885: note: def [_T1, _T2, _T3] gather(Future[_T1] | Awaitable[_T1], Future[_T2] | Awaitable[_T2], Future[_T3] | Awaitable[_T3], /, *, return_exceptions: Literal[False] = ...) -> Future[tuple[_T1, _T2, _T3]]
- pymongo/synchronous/pool.py:885: note: def [_T1, _T2, _T3, _T4] gather(Future[_T1] | Awaitable[_T1], Future[_T2] | Awaitable[_T2], Future[_T3] | Awaitable[_T3], Future[_T4] | Awaitable[_T4], /, *, return_exceptions: Literal[False] = ...) -> Future[tuple[_T1, _T2, _T3, _T4]]
- pymongo/synchronous/pool.py:885: note: def [_T1, _T2, _T3, _T4, _T5] gather(Future[_T1] | Awaitable[_T1], Future[_T2] | Awaitable[_T2], Future[_T3] | Awaitable[_T3], Future[_T4] | Awaitable[_T4], Future[_T5] | Awaitable[_T5], /, *, return_exceptions: Literal[False] = ...) -> Future[tuple[_T1, _T2, _T3, _T4, _T5]]
- pymongo/synchronous/pool.py:885: note: def [_T1, _T2, _T3, _T4, _T5, _T6] gather(Future[_T1] | Awaitable[_T1], Future[_T2] | Awaitable[_T2], Future[_T3] | Awaitable[_T3], Future[_T4] | Awaitable[_T4], Future[_T5] | Awaitable[_T5], Future[_T6] | Awaitable[_T6], /, *, return_exceptions: Literal[False] = ...) -> Future[tuple[_T1, _T2, _T3, _T4, _T5, _T6]]
- pymongo/synchronous/pool.py:885: note: def [_T] gather(*coros_or_futures: Future[_T] | Awaitable[_T], return_exceptions: Literal[False] = ...) -> Future[list[_T]]
- pymongo/synchronous/pool.py:885: note: def [_T1] gather(Future[_T1] | Awaitable[_T1], /, *, return_exceptions: bool) -> Future[tuple[_T1 | BaseException]]
- pymongo/synchronous/pool.py:885: note: def [_T1, _T2] gather(Future[_T1] | Awaitable[_T1], Future[_T2] | Awaitable[_T2], /, *, return_exceptions: bool) -> Future[tuple[_T1 | BaseException, _T2 | BaseException]]
- pymongo/synchronous/pool.py:885: note: def [_T1, _T2, _T3] gather(Future[_T1] | Awaitable[_T1], Future[_T2] | Awaitable[_T2], Future[_T3] | Awaitable[_T3], /, *, return_exceptions: bool) -> Future[tuple[_T1 | BaseException, _T2 | BaseException, _T3 | BaseException]]
- pymongo/synchronous/pool.py:885: note: def [_T1, _T2, _T3, _T4] gather(Future[_T1] | Awaitable[_T1], Future[_T2] | Awaitable[_T2], Future[_T3] | Awaitable[_T3], Future[_T4] | Awaitable[_T4], /, *, return_exceptions: bool) -> Future[tuple[_T1 | BaseException, _T2 | BaseException, _T3 | BaseException, _T4 | BaseException]]
- pymongo/synchronous/pool.py:885: note: def [_T1, _T2, _T3, _T4, _T5] gather(Future[_T1] | Awaitable[_T1], Future[_T2] | Awaitable[_T2], Future[_T3] | Awaitable[_T3], Future[_T4] | Awaitable[_T4], Future[_T5] | Awaitable[_T5], /, *, return_exceptions: bool) -> Future[tuple[_T1 | BaseException, _T2 | BaseException, _T3 | BaseException, _T4 | BaseException, _T5 | BaseException]]
- pymongo/synchronous/pool.py:885: note: def [_T1, _T2, _T3, _T4, _T5, _T6] gather(Future[_T1] | Awaitable[_T1], Future[_T2] | Awaitable[_T2], Future[_T3] | Awaitable[_T3], Future[_T4] | Awaitable[_T4], Future[_T5] | Awaitable[_T5], Future[_T6] | Awaitable[_T6], /, *, return_exceptions: bool) -> Future[tuple[_T1 | BaseException, _T2 | BaseException, _T3 | BaseException, _T4 | BaseException, _T5 | BaseException, _T6 | BaseException]]
- pymongo/synchronous/pool.py:885: note: def [_T] gather(*coros_or_futures: Future[_T] | Awaitable[_T], return_exceptions: bool) -> Future[list[_T | BaseException]]
- pymongo/synchronous/pool.py:936: error: No overload variant of "gather" matches argument types "list[None]", "bool" [call-overload]
- pymongo/synchronous/pool.py:936: note: Possible overload variants:
- pymongo/synchronous/pool.py:936: note: def [_T1] gather(Future[_T1] | Awaitable[_T1], /, *, return_exceptions: Literal[False] = ...) -> Future[tuple[_T1]]
- pymongo/synchronous/pool.py:936: note: def [_T1, _T2] gather(Future[_T1] | Awaitable[_T1], Future[_T2] | Awaitable[_T2], /, *, return_exceptions: Literal[False] = ...) -> Future[tuple[_T1, _T2]]
- pymongo/synchronous/pool.py:936: note: def [_T1, _T2, _T3] gather(Future[_T1] | Awaitable[_T1], Future[_T2] | Awaitable[_T2], Future[_T3] | Awaitable[_T3], /, *, return_exceptions: Literal[False] = ...) -> Future[tuple[_T1, _T2, _T3]]
- pymongo/synchronous/pool.py:936: note: def [_T1, _T2, _T3, _T4] gather(Future[_T1] | Awaitable[_T1], Future[_T2] | Awaitable[_T2], Future[_T3] | Awaitable[_T3], Future[_T4] | Awaitable[_T4], /, *, return_exceptions: Literal[False] = ...) -> Future[tuple[_T1, _T2, _T3, _T4]]
- pymongo/synchronous/pool.py:936: note: def [_T1, _T2, _T3, _T4, _T5] gather(Future[_T1] | Awaitable[_T1], Future[_T2] | Awaitable[_T2], Future[_T3] | Awaitable[_T3], Future[_T4] | Awaitable[_T4], Future[_T5] | Awaitable[_T5], /, *, return_exceptions: Literal[False] = ...) -> Future[tuple[_T1, _T2, _T3, _T4, _T5]]
- pymongo/synchronous/pool.py:936: note: def [_T1, _T2, _T3, _T4, _T5, _T6] gather(Future[_T1] | Awaitable[_T1], Future[_T2] | Awaitable[_T2], Future[_T3] | Awaitable[_T3], Future[_T4] | Awaitable[_T4], Future[_T5] | Awaitable[_T5], Future[_T6] | Awaitable[_T6], /, *, return_exceptions: Literal[False] = ...) -> Future[tuple[_T1, _T2, _T3, _T4, _T5, _T6]]
- pymongo/synchronous/pool.py:936: note: def [_T] gather(*coros_or_futures: Future[_T] | Awaitable[_T], return_exceptions: Literal[False] = ...) -> Future[list[_T]]
- pymongo/synchronous/pool.py:936: note: def [_T1] gather(Future[_T1] | Awaitable[_T1], /, *, return_exceptions: bool) -> Future[tuple[_T1 | BaseException]]
- pymongo/synchronous/pool.py:936: note: def [_T1, _T2] gather(Future[_T1] | Awaitable[_T1], Future[_T2] | Awaitable[_T2], /, *, return_exceptions: bool) -> Future[tuple[_T1 | BaseException, _T2 | BaseException]]
- pymongo/synchronous/pool.py:936: note: def [_T1, _T2, _T3] gather(Future[_T1] | Awaitable[_T1], Future[_T2] | Awaitable[_T2], Future[_T3] | Awaitable[_T3], /, *, return_exceptions: bool) -> Future[tuple[_T1 | BaseException, _T2 | BaseException, _T3 | BaseException]]
... (truncated 4 lines) ...
prefect (https://github.com/PrefectHQ/prefect)
- src/prefect/blocks/core.py:86: error: Argument 4 to <tuple> has incompatible type "*tuple[object, ...]"; expected "type" [arg-type]
+ src/prefect/blocks/core.py:86: error: Incompatible types in assignment (expression has type "tuple[type[list[_T]], type[dict[_KT, _VT]], type[tuple[_T_co, ...]], Unpack[tuple[object, ...]]]", variable has type "tuple[type, ...]") [assignment]
pydantic (https://github.com/pydantic/pydantic)
- pydantic/_internal/_typing_extra.py:621: error: Too many positional arguments for "ForwardRef" [misc]
+ pydantic/_internal/_typing_extra.py:621: error: Too many positional arguments for "ForwardRef" [call-arg]
- pydantic/_internal/_typing_extra.py:621: error: Argument 2 to "ForwardRef" has incompatible type "bool"; expected "str | None" [arg-type]
- pydantic/dataclasses.py:257: error: Too many arguments [call-arg]
+ pydantic/dataclasses.py:257: error: Too many positional arguments [call-arg]
aiohttp (https://github.com/aio-libs/aiohttp)
+ aiohttp/web_urldispatcher.py:644:16: error: Exception type must be derived from BaseException (or be a tuple of exception classes) [misc]
colour (https://github.com/colour-science/colour)
- colour/plotting/models.py:2008: error: Unused "type: ignore" comment [unused-ignore]
mypy (https://github.com/python/mypy)
+ mypy/cache.py:162: error: List comprehension has incompatible type List[tuple[str | int | None, ...]]; expected List[tuple[str | None, int, int, int, int, str, str, str | None]] [misc]
meson (https://github.com/mesonbuild/meson)
+ mesonbuild/interpreter/type_checking.py:945:11: error: Need type annotation for "JAR_KWS" [var-annotated]
zulip (https://github.com/zulip/zulip)
- zerver/tests/test_typed_endpoint.py:76: error: Too many arguments for "Foo" [call-arg]
+ zerver/tests/test_typed_endpoint.py:76: error: Too many positional arguments for "Foo" [call-arg]
- zerver/tests/test_typed_endpoint.py:531: error: Too many arguments for "CustomType" [call-arg]
+ zerver/tests/test_typed_endpoint.py:531: error: Too many positional arguments for "CustomType" [call-arg]
core (https://github.com/home-assistant/core)
+ homeassistant/helpers/device_registry.py:1544: error: Set comprehension has incompatible type Set[tuple[str, ...]]; expected Set[tuple[str, str]] [misc]
+ homeassistant/helpers/device_registry.py:1551: error: Set comprehension has incompatible type Set[tuple[str, ...]]; expected Set[tuple[str, str]] [misc]
- homeassistant/components/light/__init__.py:1155: error: Too many arguments for "color_rgbww_to_rgb" [call-arg]
+ homeassistant/components/light/__init__.py:1155: error: Too many positional arguments for "color_rgbww_to_rgb" [call-arg]
+ homeassistant/components/auth/login_flow.py:333: error: Incompatible types in assignment (expression has type "tuple[str, ...]", variable has type "tuple[str, str]") [assignment]
+ homeassistant/helpers/template/extensions/base.py:54: error: Argument 1 has incompatible type "*_P.args"; expected "Any" [arg-type]
+ homeassistant/components/govee_light_local/light.py:216: error: Argument 2 to "set_rgb_color" of "GoveeLocalApiCoordinator" has incompatible type "*tuple[int, int, int] | tuple[int | None]"; expected "int" [arg-type]
+ homeassistant/components/govee_light_local/light.py:218: error: Argument 2 to "set_temperature" of "GoveeLocalApiCoordinator" has incompatible type "*tuple[int, int, int] | tuple[int | None]"; expected "int" [arg-type]
+ homeassistant/components/bryant_evolution/__init__.py:73: error: Invalid index type "tuple[int, ...]" for "dict[tuple[int, int], Any]"; expected type "tuple[int, int]" [index]
+ homeassistant/components/bryant_evolution/climate.py:46: error: Argument 1 to "get" of "dict" has incompatible type "tuple[int, ...]"; expected "tuple[int, int]" [arg-type]
+ homeassistant/components/blebox/light.py:114: error: Incompatible return value type (got "tuple[int, ...]", expected "tuple[int, int, int] | None") [return-value]
+ homeassistant/components/blebox/light.py:125: error: Incompatible return value type (got "tuple[int, ...]", expected "tuple[int, int, int, int] | None") [return-value]
+ homeassistant/components/blebox/light.py:132: error: Incompatible return value type (got "tuple[int, ...]", expected "tuple[int, int, int, int, int] | None") [return-value]
+ homeassistant/components/knx/light.py:375: error: Incompatible return value type (got "tuple[*tuple[Any, ...], Any]", expected "tuple[int, int, int, int] | None") [return-value]
+ homeassistant/components/shelly/light.py:404: error: Incompatible return value type (got "tuple[*tuple[Any, ...], Any]", expected "tuple[int, int, int, int]") [return-value]
altair (https://github.com/vega/altair)
+ altair/utils/_transformed_data.py:493: error: Argument 1 to "update" of "MutableMapping" has incompatible type "dict[tuple[str, tuple[int, ...]], tuple[str, tuple[int, ...]]]"; expected "SupportsKeysAndGetItem[tuple[Any, tuple[*tuple[int, ...], int]], tuple[Any, tuple[int, ...]]]" [arg-type]
+ altair/utils/_transformed_data.py:496: error: Incompatible return value type (got "dict[tuple[Any, tuple[*tuple[int, ...], int]], tuple[Any, tuple[int, ...]]]", expected "dict[tuple[str, tuple[int, ...]], tuple[str, tuple[int, ...]]]") [return-value]
+ altair/utils/_transformed_data.py:496: note: Perhaps you need a type annotation for "facet_mapping"? Suggestion: "dict[tuple[str, tuple[int, ...]], tuple[str, tuple[int, ...]]]"
mitmproxy (https://github.com/mitmproxy/mitmproxy)
- mitmproxy/coretypes/multidict.py:153: error: Unused "type: ignore" comment [unused-ignore]
- mitmproxy/coretypes/multidict.py:167: error: Unused "type: ignore" comment [unused-ignore]
- mitmproxy/tools/console/grideditor/base.py:168: error: Unused "type: ignore" comment [unused-ignore]
steam.py (https://github.com/Gobot1234/steam.py)
- steam/chat.py:290: error: Too many arguments for "react_to_chat_message" of "ConnectionState" [call-arg]
+ steam/chat.py:290: error: Too many positional arguments for "react_to_chat_message" of "ConnectionState" [call-arg]
- steam/chat.py:318: error: Too many arguments for "ack_chat_message" of "ConnectionState" [call-arg]
+ steam/chat.py:318: error: Too many positional arguments for "ack_chat_message" of "ConnectionState" [call-arg]
- steam/ext/commands/commands.py:553: error: Too many arguments for "object" [call-arg]
+ steam/ext/commands/commands.py:553: error: Too many positional arguments for "object" [call-arg]
sympy (https://github.com/sympy/sympy)
+ sympy/matrices/matrixbase.py:3919: error: Incompatible return value type (got "tuple[Expr, ...]", expected "tuple[Expr]") [return-value]
comtypes (https://github.com/enthought/comtypes)
+ comtypes/_memberspec.py:175: error: Argument 3 to "_DispMemberSpec" has incompatible type "tuple[dispid | str, ...]"; expected "tuple[dispid, helpstring, *tuple[str, ...]] | tuple[dispid, *tuple[str, ...]]" [arg-type]
+ comtypes/_memberspec.py:180: error: Argument 3 to "_DispMemberSpec" has incompatible type "tuple[dispid | str, ...]"; expected "tuple[dispid, helpstring, *tuple[str, ...]] | tuple[dispid, *tuple[str, ...]]" [arg-type]
urllib3 (https://github.com/urllib3/urllib3)
+ test/with_dummyserver/test_poolmanager.py:659: error: Unused "type: ignore" comment [unused-ignore]
+ test/with_dummyserver/test_poolmanager.py:659: error: Too many positional arguments for "request" [call-arg]
+ test/with_dummyserver/test_poolmanager.py:659: note: Error code "call-arg" not covered by "type: ignore" comment
egglog-python (https://github.com/egraphs-good/egglog-python)
+ python/egglog/thunk.py:54: error: Incompatible return value type (got "Thunk[T, *tuple[Never, ...]]", expected "Thunk[T]") [return-value]
pandas (https://github.com/pandas-dev/pandas)
+ pandas/core/col.py:52: error: Incompatible return value type (got "tuple[Series, ...]", expected "tuple[Series]") [return-value]
discord.py (https://github.com/Rapptz/discord.py)
- discord/ext/tasks/__init__.py:500: error: Incompatible types in assignment (expression has type "tuple[type, ...]", variable has type "tuple[type[OSError], type[GatewayNotFound], type[ConnectionClosed], type[ClientError], type[TimeoutError]]") [assignment]
+ discord/ext/tasks/__init__.py:500: error: Incompatible types in assignment (expression has type "tuple[type[OSError], type[GatewayNotFound], type[ConnectionClosed], type[ClientError], type[TimeoutError], *tuple[type[BaseException], ...]]", variable has type "tuple[type[OSError], type[GatewayNotFound], type[ConnectionClosed], type[ClientError], type[TimeoutError]]") [assignment]
dd-trace-py (https://github.com/DataDog/dd-trace-py)
+ ddtrace/llmobs/_experiment.py:490: error: Argument 1 to "set_exc_info" of "Span" has incompatible type "*tuple[type[BaseException], BaseException, TracebackType] | tuple[None, None, None]"; expected "type[BaseException]" [arg-type]
+ ddtrace/llmobs/_experiment.py:490: error: Argument 1 to "set_exc_info" of "Span" has incompatible type "*tuple[type[BaseException], BaseException, TracebackType] | tuple[None, None, None]"; expected "BaseException" [arg-type]
+ ddtrace/llmobs/_integrations/bedrock_agents.py:244: error: Argument 1 to "set_exc_info" of "Span" has incompatible type "*tuple[type[BaseException], BaseException, TracebackType] | tuple[None, None, None]"; expected "type[BaseException]" [arg-type]
+ ddtrace/llmobs/_integrations/bedrock_agents.py:244: error: Argument 1 to "set_exc_info" of "Span" has incompatible type "*tuple[type[BaseException], BaseException, TracebackType] | tuple[None, None, None]"; expected "BaseException" [arg-type]
+ ddtrace/llmobs/_integrations/bedrock_agents.py:293: error: Argument 1 to "set_exc_info" of "Span" has incompatible type "*tuple[type[BaseException], BaseException, TracebackType] | tuple[None, None, None]"; expected "type[BaseException]" [arg-type]
+ ddtrace/llmobs/_integrations/bedrock_agents.py:293: error: Argument 1 to "set_exc_info" of "Span" has incompatible type "*tuple[type[BaseException], BaseException, TracebackType] | tuple[None, None, None]"; expected "BaseException" [arg-type]
trio (https://github.com/python-trio/trio)
+ src/trio/_core/_run.py:1972: error: Unused "type: ignore" comment [unused-ignore]
ibis (https://github.com/ibis-project/ibis)
- ibis/common/collections.py:244: error: Too many arguments for "MapSet" [call-arg]
+ ibis/common/collections.py:244: error: Too many positional arguments for "MapSet" [call-arg]
- ibis/common/collections.py:251: error: Too many arguments for "MapSet" [call-arg]
+ ibis/common/collections.py:251: error: Too many positional arguments for "MapSet" [call-arg]
- ibis/common/collections.py:258: error: Too many arguments for "MapSet" [call-arg]
+ ibis/common/collections.py:258: error: Too many positional arguments for "MapSet" [call-arg]
- ibis/common/collections.py:265: error: Too many arguments for "MapSet" [call-arg]
+ ibis/common/collections.py:265: error: Too many positional arguments for "MapSet" [call-arg]
- ibis/common/collections.py:274: error: Too many arguments for "MapSet" [call-arg]
+ ibis/common/collections.py:274: error: Too many positional arguments for "MapSet" [call-arg]
- ibis/expr/types/generic.py:384: error: Argument 1 to <tuple> has incompatible type "ibis.expr.types.generic.Value"; expected "ibis.expr.operations.core.Value[Any, Any]" [arg-type]
- ibis/expr/types/generic.py:384: error: Argument 2 to <tuple> has incompatible type "*tuple[ibis.expr.types.generic.Value, ...]"; expected "ibis.expr.operations.core.Value[Any, Any]" [arg-type]
+ ibis/expr/types/generic.py:384: error: Argument 1 to "Coalesce" has incompatible type "tuple[ibis.expr.types.generic.Value, *tuple[ibis.expr.types.generic.Value, ...]]"; expected "tuple[ibis.expr.operations.core.Value[Any, Any], ...]" [arg-type]
- ibis/expr/types/generic.py:3167: error: Too many arguments for "Value" [call-arg]
+ ibis/expr/types/generic.py:3167: error: Too many positional arguments for "Value" [call-arg]
- ibis/expr/types/strings.py:1580: error: Argument 1 to <tuple> has incompatible type "StringValue"; expected "Value[String, Any]" [arg-type]
- ibis/expr/types/strings.py:1580: error: Argument 2 to <tuple> has incompatible type "str | StringValue"; expected "Value[String, Any]" [arg-type]
- ibis/expr/types/strings.py:1580: error: Argument 3 to <tuple> has incompatible type "*tuple[str | StringValue, ...]"; expected "Value[String, Any]" [arg-type]
+ ibis/expr/types/strings.py:1580: error: Argument 1 to "StringConcat" has incompatible type "tuple[StringValue, str | StringValue, *tuple[str | StringValue, ...]]"; expected "tuple[Value[String, Any], ...]" [arg-type]
+ ibis/expr/types/arrays.py:226: error: Argument 1 to "ArrayConcat" has incompatible type "tuple[ArrayValue, ArrayValue, *tuple[ArrayValue, ...]]"; expected "tuple[Value[Array[Any], Any], ...]" [arg-type]
- ibis/expr/types/arrays.py:226: error: Argument 1 to <tuple> has incompatible type "ArrayValue"; expected "Value[Array[Any], Any]" [arg-type]
- ibis/expr/types/arrays.py:226: error: Argument 2 to <tuple> has incompatible type "ArrayValue"; expected "Value[Array[Any], Any]" [arg-type]
- ibis/expr/types/arrays.py:226: error: Argument 3 to <tuple> has incompatible type "*tuple[ArrayValue, ...]"; expected "Value[Array[Any], Any]" [arg-type]
+ ibis/expr/types/arrays.py:1014: error: Argument 1 to "ArrayZip" has incompatible type "tuple[ArrayValue, ArrayValue, *tuple[ArrayValue, ...]]"; expected "tuple[Value[Array[Any], Any], ...]" [arg-type]
- ibis/expr/types/arrays.py:1014: error: Argument 1 to <tuple> has incompatible type "ArrayValue"; expected "Value[Array[Any], Any]" [arg-type]
- ibis/expr/types/arrays.py:1014: error: Argument 2 to <tuple> has incompatible type "ArrayValue"; expected "Value[Array[Any], Any]" [arg-type]
- ibis/expr/types/arrays.py:1014: error: Argument 3 to <tuple> has incompatible type "*tuple[ArrayValue, ...]"; expected "Value[Array[Any], Any]" [arg-type]
- ibis/expr/types/relations.py:5177: error: Too many arguments for "WindowedTable" [call-arg]
+ ibis/expr/types/relations.py:5177: error: Too many positional arguments for "WindowedTable" [call-arg]
- ibis/expr/types/logical.py:333: error: Too many arguments for "Any" [call-arg]
+ ibis/expr/types/logical.py:333: error: Too many positional arguments for "Any" [call-arg]
- ibis/backends/sql/compilers/risingwave.py:30: error: Incompatible types in assignment (expression has type "tuple[type[Kurtosis] | type[Sample] | type[ApproxMultiQuantile] | type[MultiQuantile] | type[RandomUUID] | <6 more items>, ...]", base class "PostgresCompiler" defined the type as "tuple[type[RowID], type[TimeDelta], type[ArrayFlatten], type[Kurtosis]]") [assignment]
+ ibis/backends/sql/compilers/risingwave.py:30: error: Incompatible types in assignment (expression has type "tuple[type[Arbitrary], type[Mode], type[RandomScalar], type[RandomUUID], type[MultiQuantile], type[ApproxMultiQuantile], type[Sample], type[Kurtosis], *tuple[type[GeoSpatialUnOp] | type[GeoSpatialBinOp] | type[GeoUnaryUnion], ...]]", base class "PostgresCompiler" defined the type as "tuple[type[RowID], type[TimeDelta], type[ArrayFlatten], type[Kurtosis]]") [assignment]
- ibis/expr/operations/tests/test_generic.py:111: error: Too many arguments for "Literal" [call-arg]
+ ibis/expr/operations/tests/test_generic.py:111: error: Too many positional arguments for "Literal" [call-arg]
- ibis/common/tests/test_grounds.py:777: error: Too many arguments for "StringOp" [call-arg]
+ ibis/common/tests/test_grounds.py:777: error: Too many positional arguments for "StringOp" [call-arg]
- ibis/common/tests/test_grounds.py:989: error: Too many arguments for "AnnSing" [call-arg]
+ ibis/common/tests/test_grounds.py:989: error: Too many positional arguments for "AnnSing" [call-arg]
- ibis/common/tests/test_grounds.py:990: error: Too many arguments for "AnnSing" [call-arg]
+ ibis/common/tests/test_grounds.py:990: error: Too many positional arguments for "AnnSing" [call-arg]
- ibis/common/tests/test_grounds.py:991: error: Too many arguments for "AnnSing" [call-arg]
+ ibis/common/tests/test_grounds.py:991: error: Too many positional arguments for "AnnSing" [call-arg]
- ibis/common/tests/test_grounds.py:992: error: Too many arguments for "AnnSing" [call-arg]
+ ibis/common/tests/test_grounds.py:992: error: Too many positional arguments for "AnnSing" [call-arg]
- ibis/common/tests/test_grounds.py:995: error: Too many arguments for "SingAnn" [call-arg]
+ ibis/common/tests/test_grounds.py:995: error: Too many positional arguments for "SingAnn" [call-arg]
- ibis/common/tests/test_grounds.py:996: error: Too many arguments for "SingAnn" [call-arg]
+ ibis/common/tests/test_grounds.py:996: error: Too many positional arguments for "SingAnn" [call-arg]
- ibis/common/tests/test_grounds.py:997: error: Too many arguments for "SingAnn" [call-arg]
+ ibis/common/tests/test_grounds.py:997: error: Too many positional arguments for "SingAnn" [call-arg]
- ibis/common/tests/test_grounds.py:999: error: Too many arguments for "SingAnn" [call-arg]
+ ibis/common/tests/test_grounds.py:999: error: Too many positional arguments for "SingAnn" [call-arg]
jax (https://github.com/google/jax)
+ jaxlib/gpu_linalg.py:31: error: Generator has incompatible item type "tuple[*tuple[Any, ...], int]"; expected "tuple[str, Any, int]" [misc]
+ jaxlib/gpu_solver.py:40: error: Generator has incompatible item type "tuple[*tuple[Any, ...], int]"; expected "tuple[str, Any, int]" [misc]
+ jax/_src/interpreters/ad.py:60: error: Argument 2 to "annotate" has incompatible type "tuple[AbstractValue | Any, ...]"; expected "tuple[AbstractValue] | None" [arg-type]
+ jax/_src/interpreters/pxla.py:2104: error: Incompatible return value type (got "tuple[Layout | None, ...]", expected "tuple[Layout | None]") [return-value]
+ jax/_src/state/primitives.py:827: error: Incompatible types in assignment (expression has type "tuple[()]", variable has type "tuple[int, *tuple[int | Array, ...]]") [assignment]
+ jax/_src/lax/parallel.py:821: error: Incompatible return value type (got "tuple[str, ...]", expected "tuple[str]") [return-value]
+ jax/experimental/mosaic/gpu/utils.py:1991: error: Incompatible return value type (got "tuple[*tuple[Any, ...], Any]", expected "tuple[Any, Any, Any, Any]") [return-value]
+ jax/experimental/mosaic/gpu/fragmented_array.py:238: error: Unused "type: ignore" comment [unused-ignore]
+ jax/experimental/mosaic/gpu/fragmented_array.py:238: error: Incompatible types in assignment (expression has type "tuple[tuple[int, ...] | list[int], ...]", variable has type "tuple[tuple[int, ...], ...]") [assignment]
+ jax/experimental/mosaic/gpu/fragmented_array.py:238: note: Error code "assignment" not covered by "type: ignore" comment
+ jax/experimental/mosaic/gpu/fragmented_array.py:239: error: Unused "type: ignore" comment [unused-ignore]
+ jax/experimental/mosaic/gpu/fragmented_array.py:239: error: Incompatible types in assignment (expression has type "tuple[tuple[int, ...] | list[int], ...]", variable has type "tuple[tuple[int, ...], ...]") [assignment]
+ jax/experimental/mosaic/gpu/fragmented_array.py:239: note: Error code "assignment" not covered by "type: ignore" comment
pyodide (https://github.com/pyodide/pyodide)
+ pyodide-build/pyodide_build/xbuildenv.py:309: error: List item 0 has incompatible type "list[str | None] | list[str]"; expected "str | bytes | PathLike[str] | PathLike[bytes]" [list-item]
pandas-stubs (https://github.com/pandas-dev/pandas-stubs)
+ tests/test_string_accessors.py:172: error: Unused "type: ignore" comment [unused-ignore]
+ tests/test_string_accessors.py:172: error: Too many positional arguments for "wrap" of "StringMethods" [call-arg]
+ tests/test_string_accessors.py:172: note: Error code "call-arg" not covered by "type: ignore" comment
+ tests/test_string_accessors.py:230: error: Unused "type: ignore" comment [unused-ignore]
+ tests/test_string_accessors.py:230: error: Too many positional arguments for "wrap" of "StringMethods" [call-arg]
+ tests/test_string_accessors.py:230: note: Error code "call-arg" not covered by "type: ignore" comment
kornia (https://github.com/kornia/kornia)
- kornia/feature/dedode/transformer/dinov2.py:309: error: Incompatible return value type (got "tuple[tuple[Any, Any], ...]", expected "tuple[Any | tuple[Any]]") [return-value]
+ kornia/feature/dedode/transformer/dinov2.py:309: error: Incompatible return value type (got "tuple[Any | tuple[Any], ...]", expected "tuple[Any | tuple[Any]]") [return-value]
+ kornia/feature/dedode/transformer/dinov2.py:310: error: Incompatible return value type (got "tuple[Any | tuple[Any], ...]", expected "tuple[Any | tuple[Any]]") [return-value]
scikit-learn (https://github.com/scikit-learn/scikit-learn)
+ sklearn/ensemble/_hist_gradient_boosting/tests/test_gradient_boosting.py:184: error: List item 0 has incompatible type "tuple[type[HistGradientBoostingClassifier], *tuple[Any, ...]]"; expected "tuple[type[BaseHistGradientBoosting], *tuple[Any, ...]]" [list-item]
+ sklearn/ensemble/_hist_gradient_boosting/tests/test_gradient_boosting.py:185: error: List item 1 has incompatible type "tuple[type[HistGradientBoostingClassifier], *tuple[Any, ...]]"; expected "tuple[type[BaseHistGradientBoosting], *tuple[Any, ...]]" [list-item]
apprise (https://github.com/caronc/apprise)
+ apprise/persistent_store.py:150: error: Too many positional arguments [call-arg]
- apprise/persistent_store.py:150: error: Function gets multiple values for keyword argument "usedforsecurity" [misc]
- apprise/persistent_store.py:151: error: Argument 1 has incompatible type "bytes"; expected "bool" [arg-type]
dedupe (https://github.com/dedupeio/dedupe)
+ dedupe/core.py:196: error: Argument 1 to "zip" has incompatible type "*tuple[int, Mapping[str, Any]] | tuple[str, Mapping[str, Any]]"; expected "Iterable[str]" [arg-type]
materialize (https://github.com/MaterializeInc/materialize)
- misc/python/materialize/output_consistency/ignore_filter/ignore_verdict.py:22: error: Too many arguments for "__init__" of "object" [call-arg]
+ misc/python/materialize/output_consistency/ignore_filter/ignore_verdict.py:22: error: Too many positional arguments for "__init__" of "object" [call-arg]
+ misc/python/materialize/mzcompose/composition.py:374: error: Argument 1 to "Popen" has incompatible type "list[object]"; expected "str | bytes | PathLike[str] | PathLike[bytes] | Sequence[str | bytes | PathLike[str] | PathLike[bytes]]" [arg-type]
+ misc/python/materialize/mzcompose/composition.py:460: error: Not all union combinations were tried because there are too many unions [misc]
+ misc/python/materialize/mzcompose/composition.py:461: error: Argument 1 to "run" has incompatible type "list[object]"; expected "str | bytes | PathLike[str] | PathLike[bytes] | Sequence[str | bytes | PathLike[str] | PathLike[bytes]]" [arg-type]
rotki (https://github.com/rotki/rotki)
+ rotkehlchen/globaldb/upgrades/v2_v3.py:212: error: Tuple index out of range [misc]
+ rotkehlchen/globaldb/upgrades/v2_v3.py:212: note: Variadic tuple can have length 1
+ rotkehlchen/globaldb/upgrades/v2_v3.py:213: error: Tuple index out of range [misc]
+ rotkehlchen/globaldb/upgrades/v2_v3.py:213: note: Variadic tuple can have length 1
+ rotkehlchen/globaldb/upgrades/v2_v3.py:214: error: Tuple index out of range [misc]
+ rotkehlchen/globaldb/upgrades/v2_v3.py:214: note: Variadic tuple can have length 1
+ rotkehlchen/globaldb/upgrades/v2_v3.py:216: error: Tuple index out of range [misc]
+ rotkehlchen/globaldb/upgrades/v2_v3.py:216: note: Variadic tuple can have length 1
+ rotkehlchen/globaldb/upgrades/v2_v3.py:218: error: Tuple index out of range [misc]
+ rotkehlchen/globaldb/upgrades/v2_v3.py:218: note: Variadic tuple can have length 1
+ rotkehlchen/globaldb/upgrades/v2_v3.py:219: error: Tuple index out of range [misc]
+ rotkehlchen/globaldb/upgrades/v2_v3.py:219: note: Variadic tuple can have length 1
+ rotkehlchen/globaldb/upgrades/v2_v3.py:223: error: Tuple index out of range [misc]
+ rotkehlchen/globaldb/upgrades/v2_v3.py:223: note: Variadic tuple can have length 1
+ rotkehlchen/globaldb/upgrades/v2_v3.py:228: error: Tuple index out of range [misc]
+ rotkehlchen/globaldb/upgrades/v2_v3.py:228: note: Variadic tuple can have length 1
+ rotkehlchen/globaldb/upgrades/v2_v3.py:229: error: Tuple index out of range [misc]
+ rotkehlchen/globaldb/upgrades/v2_v3.py:229: note: Variadic tuple can have length 1
+ rotkehlchen/globaldb/upgrades/v2_v3.py:230: error: Tuple index out of range [misc]
+ rotkehlchen/globaldb/upgrades/v2_v3.py:230: note: Variadic tuple can have length 1
+ rotkehlchen/globaldb/upgrades/v2_v3.py:232: error: Tuple index out of range [misc]
+ rotkehlchen/globaldb/upgrades/v2_v3.py:232: note: Variadic tuple can have length 1
+ rotkehlchen/chain/solana/decoding/decoder.py:583: error: Argument 6 to "decode_safely" has incompatible type "*tuple[SolanaEventDecoderContext | SolanaDecoderContext, *tuple[Any, ...]]"; expected "tuple[Any]" [arg-type]
+ rotkehlchen/chain/evm/decoding/decoder.py:467: error: Argument 6 to "decode_safely" has incompatible type "*tuple[DecoderContext, *tuple[Any, ...]]"; expected "tuple[Any]" [arg-type]
xarray (https://github.com/pydata/xarray)
+ xarray/tests/test_deprecation_helpers.py:18: error: Unused "type: ignore" comment [unused-ignore]
+ xarray/tests/test_deprecation_helpers.py: note: In function "test_deprecate_positional_args_warns_for_function":
+ xarray/tests/test_deprecation_helpers.py:18: error: Too many positional arguments for "f1" [call-arg]
+ xarray/tests/test_deprecation_helpers.py:18: note: Error code "call-arg" not covered by "type: ignore" comment
+ xarray/tests/test_deprecation_helpers.py: note: At top level:
+ xarray/tests/test_deprecation_helpers.py:22: error: Unused "type: ignore" comment [unused-ignore]
+ xarray/tests/test_deprecation_helpers.py: note: In function "test_deprecate_positional_args_warns_for_function":
+ xarray/tests/test_deprecation_helpers.py:22: error: Too many positional arguments for "f1" [call-arg]
+ xarray/tests/test_deprecation_helpers.py:22: note: Error code "call-arg" not covered by "type: ignore" comment
+ xarray/tests/test_deprecation_helpers.py: note: At top level:
+ xarray/tests/test_deprecation_helpers.py:26: error: Unused "type: ignore" comment [unused-ignore]
+ xarray/tests/test_deprecation_helpers.py: note: In function "test_deprecate_positional_args_warns_for_function":
+ xarray/tests/test_deprecation_helpers.py:26: error: Too many positional arguments for "f1" [call-arg]
+ xarray/tests/test_deprecation_helpers.py:26: note: Error code "call-arg" not covered by "type: ignore" comment
+ xarray/tests/test_deprecation_helpers.py: note: At top level:
+ xarray/tests/test_deprecation_helpers.py:34: error: Unused "type: ignore" comment [unused-ignore]
+ xarray/tests/test_deprecation_helpers.py: note: In function "test_deprecate_positional_args_warns_for_function":
+ xarray/tests/test_deprecation_helpers.py:34: error: Too many positional arguments for "f2" [call-arg]
+ xarray/tests/test_deprecation_helpers.py:34: note: Error code "call-arg" not covered by "type: ignore" comment
+ xarray/tests/test_deprecation_helpers.py: note: At top level:
+ xarray/tests/test_deprecation_helpers.py:42: error: Unused "type: ignore" comment [unused-ignore]
+ xarray/tests/test_deprecation_helpers.py: note: In function "test_deprecate_positional_args_warns_for_function":
+ xarray/tests/test_deprecation_helpers.py:42: error: Too many positional arguments for "f3" [call-arg]
+ xarray/tests/test_deprecation_helpers.py:42: note: Error code "call-arg" not covered by "type: ignore" comment
+ xarray/tests/test_deprecation_helpers.py: note: At top level:
+ xarray/tests/test_deprecation_helpers.py:46: error: Unused "type: ignore" comment [unused-ignore]
+ xarray/tests/test_deprecation_helpers.py: note: In function "test_deprecate_positional_args_warns_for_function":
+ xarray/tests/test_deprecation_helpers.py:46: error: Too many positional arguments for "f3" [call-arg]
+ xarray/tests/test_deprecation_helpers.py:46: note: Error code "call-arg" not covered by "type: ignore" comment
+ xarray/tests/test_deprecation_helpers.py: note: At top level:
+ xarray/tests/test_deprecation_helpers.py:60: error: Unused "type: ignore" comment [unused-ignore]
+ xarray/tests/test_deprecation_helpers.py: note: In function "test_deprecate_positional_args_warns_for_function":
+ xarray/tests/test_deprecation_helpers.py:60: error: Too many positional arguments for "f4" [call-arg]
+ xarray/tests/test_deprecation_helpers.py:60: note: Error code "call-arg" not covered by "type: ignore" comment
+ xarray/tests/test_deprecation_helpers.py: note: At top level:
+ xarray/tests/test_deprecation_helpers.py:83: error: Unused "type: ignore" comment [unused-ignore]
+ xarray/tests/test_deprecation_helpers.py: note: In function "test_deprecate_positional_args_warns_for_class":
+ xarray/tests/test_deprecation_helpers.py:83: error: Too many positional arguments for "method" of "A1" [call-arg]
+ xarray/tests/test_deprecation_helpers.py:83: note: Error code "call-arg" not covered by "type: ignore" comment
+ xarray/tests/test_deprecation_helpers.py: note: At top level:
+ xarray/tests/test_deprecation_helpers.py:87: error: Unused "type: ignore" comment [unused-ignore]
+ xarray/tests/test_deprecation_helpers.py: note: In function "test_deprecate_positional_args_warns_for_class":
+ xarray/tests/test_deprecation_helpers.py:87: error: Too many positional arguments for "method" of "A1" [call-arg]
+ xarray/tests/test_deprecation_helpers.py:87: note: Error code "call-arg" not covered by "type: ignore" comment
+ xarray/tests/test_deprecation_helpers.py: note: At top level:
+ xarray/tests/test_deprecation_helpers.py:91: error: Unused "type: ignore" comment [unused-ignore]
... (truncated 43 lines) ...``` |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Apologies in advance for this monster PR.
This is based on #19651, which had a flaw discovered in #19651 (comment), that turned out to be lethal for the approach taken. It turns out we need much more machinery and rework a few major pieces to get everything working.
Fixed issues
Partially Fixed Issues
What does this PR do?
Closes over 10 issues related to *args usage, by improving parsing of positional and star arguments, as well as tuple expressions. Highlights:
- star args now deals much more precisely with unions of tuples.
some examplesThis is a new unit test:
whereas on master, the output is just
https://mypy-play.net/?mypy=latest&python=3.12&gist=82739825de042dfeea487d83823d11bd
- star args accepts now much more legal call signatures that are currently falsely rejected.
An extreme exampleBelow we have function that expectes 2 prefix items, a variadic type and 2 suffix items, as well as all 45 possible ways of bracketing these arguments as intermediate tuples (with at least 2 members).
On master, only 4 out of these 45 runtime legal calls succeed!!
Whereas with this PR, all 45 work. Code sample in pyright playground, https://mypy-play.net/?mypy=latest&python=3.12&gist=2be305f25ddbea0fc37f02b319a2d90d
Why the earlier PR failed
Correctly parsing unions of tuples requires all pieces of the machinery to work together, starting with argmap.map_actuals_to_formals. A major obstacle is that the prior approach needed access to the TypeInfo of typing.Iterable, builtins.tuple and builtins.function in order to parse are star argument. This information was provided by infer.ArgumentInferContext. However, this information is not present in many places where argmap.map_actuals_to_formals is used (maybe this can be changed?)
High Level Overview
To address the limitation, I added a piece of machinery I call TupleNormalForm (TNF), which can be used to determine the prefix-size, suffix-size and whether a star argument will be variadic or not without actually materializing the tuple type. This step is delayed until the ArgumentInferContext information is present.
Details This is accomplished by creating an abstract representation as a list of prefix types, list of suffix types and a "dirty" `UnpackType`, which can contain, appart from the usual stuff:For example, given a union of tuples, tuple[int, int, int] | tuple[str, *tuple[str, ...], str], the TNF will result in:
or, spelled out: UnpackType[UnionType[UnpackType[TypeList[int]], UnpackType[TupleInstance]]]
Moreover, the following pieces have been majorly refactored:
-
- parse_star_argument: new method that converts *args argument into a TupleType
- parse_star_parameter: new method that converts *args : T parameter into a TupleType
- unparse_star_parameter: new method that reverts certain normalization done by the previous method
- expand_actual_type: complete rewrite of the ARG_STAR branch.
-
- now also keeps track of builtins.function and builtins.tuple type.
- added a bunch of utility methods for instantiating iterable / tuple types.
- contains parts of the machinery for materializing a TNF (maybe this should be put elsewhere?)
-
- check_argument_count: refactored. Mostly cleanup, but added new check for too few arguments for ARG_STAR, by inspecting the TNF.
- check_for_extra_actual_arguments: refactored, two big changes: (1) we now use TNF to check for too many positional arguments. Previously, this just checked .items when actual_type was a TupleType, which does not work e.g. for unions of tuples. (2) now issues too_many_positional_arguments when unallocated ARG_POS/ARG_STAR is detected, hence a lot of tests changed from too many arguments to too many positional arguments.
- check_argument_types: rewritten from scratch, and majorly simplified.
- no longer incorporates too_many_arguments and too_few_arguments checks, this is now completely handled by the reworked check_argument_count method.
- checking formal-kind other than ARG_STAR is straightforward
- checking ARG_STAR now works by first converting the formal type to a tuple, and then, for each actual mapped to it, creating an expected_type which is either an item of that tuple (if the actual is ARG_POS) or a slice of that tuple (if the actual is ARG_STAR).
- the logic for this mapping is in a helper function map_actuals_to_star_parameter
- visit_tuple_expression: makes use of the TNF machinery to give more precise results (even more precise than allow_precise_tuples)
Exampleargmap.ArgTypeExpander
Now, *args argument will in a first step always be parsed into a TupleType. Then, if formal_kind is ARG_POS we return a single item from the tuple, and if it is ARG_STAR, we return a slice from the tuple.
infer.ArgumentInferContext
checkexpr.Expressionchecker:
Consider unit test testPackingVariadicTuplesTypeVar: mypy-play
Currently, (*arg, *arg) becomes tuple[object, ...] when arg=tuple[int, *Ts, str]. With the rework, it becomes the much more precise tuple[int, *tuple[int | str | Any, ...], str].
Generally, the machinery maintains prefixes and suffixes. Maybe in the future one could maintain the minimum length as well, or even allow multiple unpacks.
constraints.infer_constraints_for_callable: major rework
Constraints.ConstraintBuilderVisitor
When comparing two tuples, we now consider the TNF of both actual and template, and branch into 4 possible cases, depending on whether either of them is variadic. We greedily match prefix and suffix items and match the remaining sub-tuples appropriately.
subtypes.variadic_tuple_subtype: this is probably the most controversial, and may require some more work.
After some discussion here Incorrect mapping of actual to formal arguments. #19692 (comment), the idea was to allow variadic tuples to match any requested size. (e.g. *arg of type tuple[str, *tuple[str, ...]] is valid for a function that needs exactly 2 strings.) That is, as an argument, tuple[str, ...] behaves like AnyOf rather than Union (see AnyOf - Union for return types typing#566). I realized this by modifying subtyping behavior so that this is true, unless we check is_proper_subtype. However, this introduces some side effects that are probably unwanted; consider the changes to check-typevar-tuple.test::testVariadicTupleSubtyping as an example.
And some minor changes:
types.TupleType
checker.TypeChecker.check_multi_assignment_from_tuple added an extra branch to deal with an issue detailed in Inconsistent constraint resolution for tuples. #19860 (comment)
Open Problems
tuple(...) and tuple literals produce different inference:
Custom iterators which overwrite __iter__ still produce too wide types(Overridden __iter__ with more specific item type is only respected in some contexts #16492)
The additional machinery in the current PR (TupleNormalForm) is quite complex, but could be severly simplified if the TypeInfo of builtins.tuple and typing.Iterable were available globally.
I haven't run any benchmark yet, but I could image the parsing is slower than before.
The more precise tuple handling introduced by this PR can introduce intermediary tuple types like tuple[T, *tuple[S, ...]] which can trigger tuple index checks that mypy omits for tuple[T, ...]. (see: tuple index out of range error is inconsistent #20475, tuple[Any, *tuple[Any, ...]] is not assignable to other tuple types #19109 and Lenient TypeVarTuple checking when number of dimensions is unknown #18665 and mypy-primer result for rotki)
Changes to tests
New Tests