microsoft / pyright

Static Type Checker for Python
Other
13.12k stars 1.4k forks source link

Further simplified TypeVar constraint tracking and solving. Removed t… #8707

Closed erictraut closed 1 month ago

erictraut commented 1 month ago

…he need to track separate constraints for dest and src.

github-actions[bot] commented 1 month ago

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


anyio (https://github.com/agronholm/anyio)
+   /tmp/mypy_primer/projects/anyio/src/anyio/_backends/_asyncio.py:905:13 - error: Argument of type "partial[None]" cannot be assigned to parameter "func" of type "(*PosArgsT@run_sync_from_thread) -> T_Retval@run_sync_from_thread" in function "run_sync_from_thread"
+     Type "partial[None]" is incompatible with type "((func: (*PosArgsT@_call_func) -> (Awaitable[T_Retval@_call_func] | T_Retval@_call_func), args: tuple[*PosArgsT@_call_func], kwargs: dict[str, Any], future: Future[T_Retval@_call_func]) -> Coroutine[Any, Any, None], (*PosArgsT@_spawn_task_from_thread) -> (Awaitable[T_Retval@_spawn_task_from_thread] | T_Retval@_spawn_task_from_thread), tuple[*PosArgsT@_spawn_task_from_thread], dict[str, Any], Future[T_Retval@_spawn_task_from_thread]) -> None"
+       Parameter 3: type "tuple[*PosArgsT@_spawn_task_from_thread]" is incompatible with type "*PosArgsT@start_soon"
+         Type "*tuple[tuple[*PosArgsT@_spawn_task_from_thread]]" is incompatible with type "*tuple[(*PosArgsT@_call_func) -> (Awaitable[T_Retval@_call_func] | T_Retval@_call_func), tuple[*PosArgsT@_call_func], dict[str, Any], Future[T_Retval@_call_func]]"
+           "*tuple[tuple[*PosArgsT@_spawn_task_from_thread]]" is incompatible with "*tuple[(*PosArgsT@_call_func) -> (Awaitable[T_Retval@_call_func] | T_Retval@_call_func), tuple[*PosArgsT@_call_func], dict[str, Any], Future[T_Retval@_call_func]]"
+             Tuple size mismatch; expected 4 but received 1
+       Parameter 4: type "dict[str, Any]" is incompatible with type "*PosArgsT@start_soon"
+         Type "*tuple[dict[str, Any]]" is incompatible with type "*tuple[(*PosArgsT@_call_func) -> (Awaitable[T_Retval@_call_func] | T_Retval@_call_func), tuple[*PosArgsT@_call_func], dict[str, Any], Future[T_Retval@_call_func]]"
+           "*tuple[dict[str, Any]]" is incompatible with "*tuple[(*PosArgsT@_call_func) -> (Awaitable[T_Retval@_call_func] | T_Retval@_call_func), tuple[*PosArgsT@_call_func], dict[str, Any], Future[T_Retval@_call_func]]"
+     ... (reportArgumentType)
- 30 errors, 1 warning, 0 informations 
+ 31 errors, 1 warning, 0 informations 

mypy (https://github.com/python/mypy)
-   /tmp/mypy_primer/projects/mypy/mypy/typeshed/stdlib/contextvars.pyi:57:9 - error: Overload 3 for "get" will never be used because its parameters overlap overload 2 (reportOverlappingOverload)
- 1739 errors, 108 warnings, 0 informations 
+ 1738 errors, 108 warnings, 0 informations 

sympy (https://github.com/sympy/sympy)
-     Return type mismatch: base method returns type "tuple[Unknown, Unknown | Any] | None", override returns type "list[Unknown]"
+     Return type mismatch: base method returns type "tuple[Unknown, Unknown] | None", override returns type "list[Unknown]"
-       Type "list[Unknown]" is incompatible with type "tuple[Unknown, Unknown | Any] | None"
+       Type "list[Unknown]" is incompatible with type "tuple[Unknown, Unknown] | None"
-         "list[Unknown]" is incompatible with "tuple[Unknown, Unknown | Any]"
+         "list[Unknown]" is incompatible with "tuple[Unknown, Unknown]"

pip (https://github.com/pypa/pip)
-   /tmp/mypy_primer/projects/pip/src/pip/_vendor/typing_extensions.py:1028:20 - error: Expression of type "__call__" is incompatible with declared type "(self: Self@type, ...) -> Any"
-     Type "Overload[() -> dict[Unknown, Unknown], (**kwargs: _VT@dict) -> dict[str, _VT@dict], (map: SupportsKeysAndGetItem[_KT@dict, _VT@dict], /) -> dict[_KT@dict, _VT@dict], (map: SupportsKeysAndGetItem[str, _VT@dict], /, **kwargs: _VT@dict) -> dict[str, _VT@dict], (iterable: Iterable[tuple[_KT@dict, _VT@dict]], /) -> dict[_KT@dict, _VT@dict], (iterable: Iterable[tuple[str, _VT@dict]], /, **kwargs: _VT@dict) -> dict[str, _VT@dict], (iterable: Iterable[list[str]], /) -> dict[str, str], (iterable: Iterable[list[bytes]], /) -> dict[bytes, bytes]] | ((...) -> dict[_KT@dict, _VT@dict])" is incompatible with type "(self: Self@type, ...) -> Any"
-       No overloaded function matches type "(self: Self@type, ...) -> Any" (reportAssignmentType)
- 1836 errors, 42 warnings, 0 informations 
+ 1835 errors, 42 warnings, 0 informations 

core (https://github.com/home-assistant/core)
-   /tmp/mypy_primer/projects/core/homeassistant/helpers/config_validation.py:299:5 - error: Overloaded implementation is not consistent with signature of overload 3
-     Type "(value: _T@ensure_list | None) -> (list[_T@ensure_list] | list[Any])" is incompatible with type "(value: list[_T@ensure_list] | _T@ensure_list) -> list[_T@ensure_list]"
-       Parameter 1: type "list[_T@ensure_list] | _T@ensure_list" is incompatible with type "_T@ensure_list | None" (reportInconsistentOverload)
-   /tmp/mypy_primer/projects/core/homeassistant/util/hass_dict.pyi:93:9 - error: Overload 6 for "pop" will never be used because its parameters overlap overload 5 (reportOverlappingOverload)
- 23833 errors, 354 warnings, 0 informations 
+ 23831 errors, 354 warnings, 0 informations 

steam.py (https://github.com/Gobot1234/steam.py)
+   /tmp/mypy_primer/projects/steam.py/steam/ext/commands/commands.py:851:5 - error: Overloaded implementation is not consistent with signature of overload 1
+     Type "(callback: CoroFuncT@group | None = None, /, *, name: str | None = None, cls: type[G@group] | None = None, **attrs: Any) -> (((CoroFuncT@group) -> G@group) | G@group)" is incompatible with type "(callback: CallbackT[CogT@group, P@group, R@group], /) -> Group[CogT@group, P@group, R@group]"
+       Parameter 1: type "CallbackT[CogT@group, P@group, R@group]" is incompatible with type "CoroFuncT@group | None" (reportInconsistentOverload)
-     Type "(self: Self@Metal, other: SupportsMetal) -> Metal" is incompatible with type "(Metal, Metal) -> Metal"
+     Type "(self: Self@Metal, other: SupportsMetal) -> Metal" is incompatible with type "(Self@Metal, Self@Metal) -> Self@Metal"
-       Parameter 1: type "Metal" is incompatible with type "Self@Metal"
+       Function return type "Metal" is incompatible with type "Self@Metal"
+         Type "Metal" is incompatible with type "Self@Metal" (reportArgumentType)
+   /tmp/mypy_primer/projects/steam.py/steam/ext/tf2/currency.py:147:36 - error: Argument of type "Generator[Metal, None, None]" cannot be assigned to parameter "sequence" of type "Iterable[_T@reduce]" in function "reduce"
+     "Generator[Metal, None, None]" is incompatible with "Iterable[Self@Metal]"
+       Type parameter "_T_co@Iterable" is covariant, but "Metal" is not a subtype of "Self@Metal"
- 8468 errors, 95 warnings, 0 informations 
+ 8470 errors, 95 warnings, 0 informations 

xarray (https://github.com/pydata/xarray)
-   /tmp/mypy_primer/projects/xarray/xarray/core/rolling.py:232:24 - error: Expression of type "list[Any | _T@_mapping_to_list | None]" is incompatible with return type "list[_T@_mapping_to_list]" (reportReturnType)
- 2400 errors, 108 warnings, 0 informations 
+ 2399 errors, 108 warnings, 0 informations 

setuptools (https://github.com/pypa/setuptools)
-   /tmp/mypy_primer/projects/setuptools/setuptools/_vendor/typing_extensions.py:1028:20 - error: Expression of type "__call__" is incompatible with declared type "(self: Self@type, ...) -> Any"
-     Type "Overload[() -> dict[Unknown, Unknown], (**kwargs: _VT@dict) -> dict[str, _VT@dict], (map: SupportsKeysAndGetItem[_KT@dict, _VT@dict], /) -> dict[_KT@dict, _VT@dict], (map: SupportsKeysAndGetItem[str, _VT@dict], /, **kwargs: _VT@dict) -> dict[str, _VT@dict], (iterable: Iterable[tuple[_KT@dict, _VT@dict]], /) -> dict[_KT@dict, _VT@dict], (iterable: Iterable[tuple[str, _VT@dict]], /, **kwargs: _VT@dict) -> dict[str, _VT@dict], (iterable: Iterable[list[str]], /) -> dict[str, str], (iterable: Iterable[list[bytes]], /) -> dict[bytes, bytes]] | ((...) -> dict[_KT@dict, _VT@dict])" is incompatible with type "(self: Self@type, ...) -> Any"
-       No overloaded function matches type "(self: Self@type, ...) -> Any" (reportAssignmentType)
- 2624 errors, 65 warnings, 0 informations 
+ 2623 errors, 65 warnings, 0 informations 

jax (https://github.com/google/jax)
+   /tmp/mypy_primer/projects/jax/jax/_src/ad_checkpoint.py:406:24 - error: "partial[partial[_T@partial]]" is not iterable
+     "__iter__" method not defined (reportGeneralTypeIssues)
+   /tmp/mypy_primer/projects/jax/jax/_src/api.py:530:29 - error: "partial[partial[_T@partial]]" is not iterable
+     "__iter__" method not defined (reportGeneralTypeIssues)
+   /tmp/mypy_primer/projects/jax/jax/_src/api.py:702:26 - error: Argument of type "partial[partial[_T@partial]]" cannot be assigned to parameter "fun" of type "WrappedFun" in function "_vjp"
+     "partial[partial[_T@partial]]" is incompatible with "WrappedFun" (reportArgumentType)
+   /tmp/mypy_primer/projects/jax/jax/_src/api.py:705:11 - error: Argument of type "partial[partial[_T@partial]]" cannot be assigned to parameter "fun" of type "WrappedFun" in function "_vjp"
+     "partial[partial[_T@partial]]" is incompatible with "WrappedFun" (reportArgumentType)
+   /tmp/mypy_primer/projects/jax/jax/_src/api.py:820:41 - error: Argument of type "partial[partial[_T@partial]]" cannot be assigned to parameter "fun" of type "WrappedFun" in function "_jvp" (reportArgumentType)
+   /tmp/mypy_primer/projects/jax/jax/_src/api.py:823:41 - error: Argument of type "partial[partial[_T@partial]]" cannot be assigned to parameter "fun" of type "WrappedFun" in function "_jvp" (reportArgumentType)
+   /tmp/mypy_primer/projects/jax/jax/_src/api.py:908:26 - error: Argument of type "partial[partial[_T@partial]]" cannot be assigned to parameter "fun" of type "WrappedFun" in function "_vjp"
+     "partial[partial[_T@partial]]" is incompatible with "WrappedFun" (reportArgumentType)
+   /tmp/mypy_primer/projects/jax/jax/_src/api.py:910:31 - error: Argument of type "partial[partial[_T@partial]]" cannot be assigned to parameter "fun" of type "WrappedFun" in function "_vjp"
+     "partial[partial[_T@partial]]" is incompatible with "WrappedFun" (reportArgumentType)
+   /tmp/mypy_primer/projects/jax/jax/_src/api.py:1221:26 - error: "partial[partial[_T@partial]]" is not iterable
+     "__iter__" method not defined (reportGeneralTypeIssues)
+   /tmp/mypy_primer/projects/jax/jax/_src/api.py:1679:18 - error: "partial[partial[_T@partial]]" is not iterable
+     "__iter__" method not defined (reportGeneralTypeIssues)
+   /tmp/mypy_primer/projects/jax/jax/_src/api.py:1681:24 - error: "partial[partial[_T@partial]]" is not iterable
+     "__iter__" method not defined (reportGeneralTypeIssues)
+   /tmp/mypy_primer/projects/jax/jax/_src/api.py:1949:26 - error: "partial[partial[_T@partial]]" is not iterable
+     "__iter__" method not defined (reportGeneralTypeIssues)
+   /tmp/mypy_primer/projects/jax/jax/_src/api.py:1955:31 - error: "partial[partial[_T@partial]]" is not iterable
+     "__iter__" method not defined (reportGeneralTypeIssues)
+   /tmp/mypy_primer/projects/jax/jax/_src/api.py:2044:29 - error: "partial[partial[_T@partial]]" is not iterable
+     "__iter__" method not defined (reportGeneralTypeIssues)
+   /tmp/mypy_primer/projects/jax/jax/_src/api.py:2046:29 - error: "partial[partial[_T@partial]]" is not iterable
+     "__iter__" method not defined (reportGeneralTypeIssues)
+   /tmp/mypy_primer/projects/jax/jax/_src/api.py:2195:26 - error: "partial[partial[_T@partial]]" is not iterable
+     "__iter__" method not defined (reportGeneralTypeIssues)
+   /tmp/mypy_primer/projects/jax/jax/_src/api.py:2199:31 - error: "partial[partial[_T@partial]]" is not iterable
+     "__iter__" method not defined (reportGeneralTypeIssues)
+   /tmp/mypy_primer/projects/jax/jax/_src/api.py:2253:24 - error: "partial[partial[_T@partial]]" is not iterable
+     "__iter__" method not defined (reportGeneralTypeIssues)
+   /tmp/mypy_primer/projects/jax/jax/_src/api_util.py:435:17 - error: "partial[partial[_T@partial]]" is not iterable
+     "__iter__" method not defined (reportGeneralTypeIssues)
+   /tmp/mypy_primer/projects/jax/jax/_src/checkify.py:362:32 - error: "partial[partial[_T@partial]]" is not iterable
+     "__iter__" method not defined (reportGeneralTypeIssues)
+   /tmp/mypy_primer/projects/jax/jax/_src/checkify.py:747:19 - error: "partial[partial[_T@partial]]" is not iterable
+     "__iter__" method not defined (reportGeneralTypeIssues)
+   /tmp/mypy_primer/projects/jax/jax/_src/checkify.py:949:34 - error: "partial[partial[_T@partial]]" is not iterable
+     "__iter__" method not defined (reportGeneralTypeIssues)
+   /tmp/mypy_primer/projects/jax/jax/_src/checkify.py:952:23 - error: "partial[partial[_T@partial]]" is not iterable
+     "__iter__" method not defined (reportGeneralTypeIssues)
+   /tmp/mypy_primer/projects/jax/jax/_src/checkify.py:1000:34 - error: "partial[partial[_T@partial]]" is not iterable
+     "__iter__" method not defined (reportGeneralTypeIssues)
+   /tmp/mypy_primer/projects/jax/jax/_src/checkify.py:1013:34 - error: "partial[partial[_T@partial]]" is not iterable
+     "__iter__" method not defined (reportGeneralTypeIssues)
+   /tmp/mypy_primer/projects/jax/jax/_src/checkify.py:1132:22 - error: "partial[partial[_T@partial]]" is not iterable
+     "__iter__" method not defined (reportGeneralTypeIssues)
+   /tmp/mypy_primer/projects/jax/jax/_src/core.py:2292:28 - error: Argument of type "partial[partial[_T@partial]]" cannot be assigned to parameter "f" of type "WrappedFun" in function "annotate"
+     "partial[partial[_T@partial]]" is incompatible with "WrappedFun" (reportArgumentType)
+   /tmp/mypy_primer/projects/jax/jax/_src/core.py:2297:26 - error: "partial[partial[_T@partial]]" is not iterable
+     "__iter__" method not defined (reportGeneralTypeIssues)
+   /tmp/mypy_primer/projects/jax/jax/_src/core.py:2341:7 - error: Method "get_bind_params" overrides class "CallPrimitive" in an incompatible manner
+     Return type mismatch: base method returns type "tuple[list[WrappedFun | partial[partial[_T@partial]]], dict[Unknown, Unknown]]", override returns type "tuple[list[WrappedFun], dict[Unknown, Unknown]]"
+       "tuple[list[WrappedFun], dict[Unknown, Unknown]]" is incompatible with "tuple[list[WrappedFun | partial[partial[_T@partial]]], dict[Unknown, Unknown]]"
+         Tuple entry 1 is incorrect type
+           "list[WrappedFun]" is incompatible with "list[WrappedFun | partial[partial[_T@partial]]]"
+             Type parameter "_T@list" is invariant, but "WrappedFun" is not the same as "WrappedFun | partial[partial[_T@partial]]"
+             Consider switching from "list" to "Sequence" which is covariant (reportIncompatibleMethodOverride)
+   /tmp/mypy_primer/projects/jax/jax/_src/core.py:2418:26 - error: "partial[partial[_T@partial]]" is not iterable
+     "__iter__" method not defined (reportGeneralTypeIssues)
+   /tmp/mypy_primer/projects/jax/jax/_src/custom_batching.py:74:26 - error: "partial[partial[_T@partial]]" is not iterable
+     "__iter__" method not defined (reportGeneralTypeIssues)
+   /tmp/mypy_primer/projects/jax/jax/_src/custom_batching.py:141:17 - error: "partial[partial[_T@partial]]" is not iterable
+     "__iter__" method not defined (reportGeneralTypeIssues)
+   /tmp/mypy_primer/projects/jax/jax/_src/custom_batching.py:142:7 - error: Expression of type "partial[partial[_T@partial]]" is incompatible with declared type "WrappedFun"
+     "partial[partial[_T@partial]]" is incompatible with "WrappedFun" (reportAssignmentType)
+   /tmp/mypy_primer/projects/jax/jax/_src/custom_batching.py:208:55 - error: "partial[partial[_T@partial]]" is not iterable
+     "__iter__" method not defined (reportGeneralTypeIssues)
+   /tmp/mypy_primer/projects/jax/jax/_src/custom_derivatives.py:257:27 - error: "partial[partial[_T@partial]]" is not iterable
+     "__iter__" method not defined (reportGeneralTypeIssues)
+   /tmp/mypy_primer/projects/jax/jax/_src/custom_derivatives.py:258:27 - error: "partial[partial[partial[partial[partial[partial[partial[partial[_T@partial]]]]]]]]" is not iterable
+     "__iter__" method not defined (reportGeneralTypeIssues)
+   /tmp/mypy_primer/projects/jax/jax/_src/custom_derivatives.py:274:10 - error: Argument of type "partial[partial[partial[partial[_T@partial]]]]" cannot be assigned to parameter "func" of type "(...) -> _T@partial" in function "__new__"
+     Type "partial[partial[partial[partial[_T@partial]]]]" is incompatible with type "(...) -> partial[partial[partial[partial[partial[partial[partial[partial[partial[_T@partial]]]]]]]]]"
+       Function return type "partial[partial[partial[_T@partial]]]" is incompatible with type "partial[partial[partial[partial[partial[partial[partial[partial[partial[_T@partial]]]]]]]]]"
+         "partial[partial[partial[_T@partial]]]" is incompatible with "partial[partial[partial[partial[partial[partial[partial[partial[partial[_T@partial]]]]]]]]]"
+           Type parameter "_T@partial" is invariant, but "partial[partial[_T@partial]]" is not the same as "partial[partial[partial[partial[partial[partial[partial[partial[_T@partial]]]]]]]]" (reportArgumentType)
+   /tmp/mypy_primer/projects/jax/jax/_src/custom_derivatives.py:355:28 - error: "partial[partial[partial[partial[partial[partial[partial[partial[_T@partial]]]]]]]]" is not iterable
+     "__iter__" method not defined (reportGeneralTypeIssues)
+   /tmp/mypy_primer/projects/jax/jax/_src/custom_derivatives.py:357:28 - error: "partial[partial[partial[partial[partial[partial[partial[partial[_T@partial]]]]]]]]" is not iterable
+     "__iter__" method not defined (reportGeneralTypeIssues)
+   /tmp/mypy_primer/projects/jax/jax/_src/custom_derivatives.py:400:10 - error: Argument of type "partial[partial[partial[partial[_T@partial]]]]" cannot be assigned to parameter "func" of type "(...) -> _T@partial" in function "__new__"
+     Type "partial[partial[partial[partial[_T@partial]]]]" is incompatible with type "(...) -> partial[partial[partial[partial[partial[partial[partial[partial[partial[_T@partial]]]]]]]]]"

... (truncated 248 lines) ...

hydra-zen (https://github.com/mit-ll-responsible-ai/hydra-zen)
+   /tmp/mypy_primer/projects/hydra-zen/src/hydra_zen/structured_configs/_implementations.py:1577:9 - error: Overloaded implementation is not consistent with signature of overload 1
+     Function return type "type[BuildsWithSig[type[R@builds], P@builds]]" is incompatible with type "type[Builds[type[BuildsWithSig[type[R@builds], P@builds]]]] | type[ZenPartialBuilds[type[BuildsWithSig[type[R@builds], P@builds]]]] | type[HydraPartialBuilds[type[BuildsWithSig[type[R@builds], P@builds]]]] | type[BuildsWithSig[type[BuildsWithSig[type[R@builds], P@builds]], P@builds]]"
+       Type "type[BuildsWithSig[type[R@builds], P@builds]]" is incompatible with type "type[Builds[type[BuildsWithSig[type[R@builds], P@builds]]]] | type[ZenPartialBuilds[type[BuildsWithSig[type[R@builds], P@builds]]]] | type[HydraPartialBuilds[type[BuildsWithSig[type[R@builds], P@builds]]]] | type[BuildsWithSig[type[BuildsWithSig[type[R@builds], P@builds]], P@builds]]"
+         "type[BuildsWithSig[type[R@builds], P@builds]]" is incompatible with "type[Builds[type[BuildsWithSig[type[R@builds], P@builds]]]]"
+         Type "type[BuildsWithSig[type[R@builds], P@builds]]" is incompatible with type "type[Builds[type[BuildsWithSig[type[R@builds], P@builds]]]]"
+           Type parameter "T@Builds" is covariant, but "type[R@builds]" is not a subtype of "type[BuildsWithSig[type[R@builds], P@builds]]"
+             "object*" is incompatible with protocol "BuildsWithSig[type[R@builds], P@builds]"
+             Type "type[R@builds]" is incompatible with type "type[BuildsWithSig[type[R@builds], P@builds]]"
+         "type[BuildsWithSig[type[R@builds], P@builds]]" is incompatible with "type[BuildsWithSig[type[BuildsWithSig[type[R@builds], P@builds]], P@builds]]" (reportInconsistentOverload)
+   /tmp/mypy_primer/projects/hydra-zen/src/hydra_zen/structured_configs/_implementations.py:3380:9 - error: Overloaded implementation is not consistent with signature of overload 2
+     Type "(cls: type[Self@BuildsFn[T@BuildsFn]], __hydra_target: (**P@kwargs_of) -> Any, *, zen_dataclass: DataclassOptions | None = None, zen_exclude: Collection[str | int] | ((str) -> bool) | None = None, **kwarg_overrides: T@BuildsFn) -> (type[BuildsWithSig[type[Dict[str, Any]], P@kwargs_of]] | type[Builds[type[Dict[str, Any]]]])" is incompatible with type "(cls: type[Self@BuildsFn[T@BuildsFn]], __hydra_target: (Any, **P@kwargs_of) -> Any, *, zen_dataclass: DataclassOptions | None = ..., zen_exclude: Tuple[Literal[0]]) -> type[BuildsWithSig[type[Dict[str, Any]], P@kwargs_of]]"
+       Parameter 2: type "(Any, **P@kwargs_of) -> Any" is incompatible with type "(**P@kwargs_of) -> Any"
+         Type "(Any, **P@kwargs_of) -> Any" is incompatible with type "(**P@kwargs_of) -> Any" (reportInconsistentOverload)
+   /tmp/mypy_primer/projects/hydra-zen/src/hydra_zen/structured_configs/_implementations.py:3380:9 - error: Overloaded implementation is not consistent with signature of overload 3
+     Type "(cls: type[Self@BuildsFn[T@BuildsFn]], __hydra_target: (**P@kwargs_of) -> Any, *, zen_dataclass: DataclassOptions | None = None, zen_exclude: Collection[str | int] | ((str) -> bool) | None = None, **kwarg_overrides: T@BuildsFn) -> (type[BuildsWithSig[type[Dict[str, Any]], P@kwargs_of]] | type[Builds[type[Dict[str, Any]]]])" is incompatible with type "(cls: type[Self@BuildsFn[T@BuildsFn]], __hydra_target: (Any, Any, **P@kwargs_of) -> Any, *, zen_dataclass: DataclassOptions | None = ..., zen_exclude: Tuple[Literal[0], Literal[1]]) -> type[BuildsWithSig[type[Dict[str, Any]], P@kwargs_of]]"
+       Parameter 2: type "(Any, Any, **P@kwargs_of) -> Any" is incompatible with type "(**P@kwargs_of) -> Any"
+         Type "(Any, Any, **P@kwargs_of) -> Any" is incompatible with type "(**P@kwargs_of) -> Any" (reportInconsistentOverload)
+   /tmp/mypy_primer/projects/hydra-zen/src/hydra_zen/structured_configs/_implementations.py:3380:9 - error: Overloaded implementation is not consistent with signature of overload 4
+     Type "(cls: type[Self@BuildsFn[T@BuildsFn]], __hydra_target: (**P@kwargs_of) -> Any, *, zen_dataclass: DataclassOptions | None = None, zen_exclude: Collection[str | int] | ((str) -> bool) | None = None, **kwarg_overrides: T@BuildsFn) -> (type[BuildsWithSig[type[Dict[str, Any]], P@kwargs_of]] | type[Builds[type[Dict[str, Any]]]])" is incompatible with type "(cls: type[Self@BuildsFn[T@BuildsFn]], __hydra_target: (Any, Any, Any, **P@kwargs_of) -> Any, *, zen_dataclass: DataclassOptions | None = ..., zen_exclude: Tuple[Literal[0], Literal[1], Literal[2]]) -> type[BuildsWithSig[type[Dict[str, Any]], P@kwargs_of]]"
+       Parameter 2: type "(Any, Any, Any, **P@kwargs_of) -> Any" is incompatible with type "(**P@kwargs_of) -> Any"
+         Type "(Any, Any, Any, **P@kwargs_of) -> Any" is incompatible with type "(**P@kwargs_of) -> Any" (reportInconsistentOverload)
+   /tmp/mypy_primer/projects/hydra-zen/src/hydra_zen/typing/_builds_overloads.py:238:9 - error: Overloaded implementation is not consistent with signature of overload 1
+     Function return type "type[BuildsWithSig[type[R@__call__], P@__call__]]" is incompatible with type "type[Builds[type[BuildsWithSig[type[R@__call__], P@__call__]]]] | type[ZenPartialBuilds[type[BuildsWithSig[type[R@__call__], P@__call__]]]] | type[HydraPartialBuilds[type[BuildsWithSig[type[R@__call__], P@__call__]]]] | type[BuildsWithSig[type[BuildsWithSig[type[R@__call__], P@__call__]], P@__call__]]"
+       Type "type[BuildsWithSig[type[R@__call__], P@__call__]]" is incompatible with type "type[Builds[type[BuildsWithSig[type[R@__call__], P@__call__]]]] | type[ZenPartialBuilds[type[BuildsWithSig[type[R@__call__], P@__call__]]]] | type[HydraPartialBuilds[type[BuildsWithSig[type[R@__call__], P@__call__]]]] | type[BuildsWithSig[type[BuildsWithSig[type[R@__call__], P@__call__]], P@__call__]]"
+         "type[BuildsWithSig[type[R@__call__], P@__call__]]" is incompatible with "type[Builds[type[BuildsWithSig[type[R@__call__], P@__call__]]]]"
+         Type "type[BuildsWithSig[type[R@__call__], P@__call__]]" is incompatible with type "type[Builds[type[BuildsWithSig[type[R@__call__], P@__call__]]]]"
+           Type parameter "T@Builds" is covariant, but "type[R@__call__]" is not a subtype of "type[BuildsWithSig[type[R@__call__], P@__call__]]"
+             "object*" is incompatible with protocol "BuildsWithSig[type[R@__call__], P@__call__]"
+             Type "type[R@__call__]" is incompatible with type "type[BuildsWithSig[type[R@__call__], P@__call__]]"
+         "type[BuildsWithSig[type[R@__call__], P@__call__]]" is incompatible with "type[BuildsWithSig[type[BuildsWithSig[type[R@__call__], P@__call__]], P@__call__]]" (reportInconsistentOverload)
+   /tmp/mypy_primer/projects/hydra-zen/src/hydra_zen/typing/_builds_overloads.py:472:9 - error: Overloaded implementation is not consistent with signature of overload 1
+     Function return type "type[BuildsWithSig[type[R@__call__], P@__call__]]" is incompatible with type "type[Builds[type[BuildsWithSig[type[R@__call__], P@__call__]]]] | type[ZenPartialBuilds[type[BuildsWithSig[type[R@__call__], P@__call__]]]] | type[HydraPartialBuilds[type[BuildsWithSig[type[R@__call__], P@__call__]]]] | type[BuildsWithSig[type[BuildsWithSig[type[R@__call__], P@__call__]], P@__call__]]"
+       Type "type[BuildsWithSig[type[R@__call__], P@__call__]]" is incompatible with type "type[Builds[type[BuildsWithSig[type[R@__call__], P@__call__]]]] | type[ZenPartialBuilds[type[BuildsWithSig[type[R@__call__], P@__call__]]]] | type[HydraPartialBuilds[type[BuildsWithSig[type[R@__call__], P@__call__]]]] | type[BuildsWithSig[type[BuildsWithSig[type[R@__call__], P@__call__]], P@__call__]]"
+         "type[BuildsWithSig[type[R@__call__], P@__call__]]" is incompatible with "type[Builds[type[BuildsWithSig[type[R@__call__], P@__call__]]]]"
+         Type "type[BuildsWithSig[type[R@__call__], P@__call__]]" is incompatible with type "type[Builds[type[BuildsWithSig[type[R@__call__], P@__call__]]]]"
+           Type parameter "T@Builds" is covariant, but "type[R@__call__]" is not a subtype of "type[BuildsWithSig[type[R@__call__], P@__call__]]"
+             "object*" is incompatible with protocol "BuildsWithSig[type[R@__call__], P@__call__]"
+             Type "type[R@__call__]" is incompatible with type "type[BuildsWithSig[type[R@__call__], P@__call__]]"
+         "type[BuildsWithSig[type[R@__call__], P@__call__]]" is incompatible with "type[BuildsWithSig[type[BuildsWithSig[type[R@__call__], P@__call__]], P@__call__]]" (reportInconsistentOverload)
+   /tmp/mypy_primer/projects/hydra-zen/src/hydra_zen/typing/_builds_overloads.py:657:9 - error: Overloaded implementation is not consistent with signature of overload 3
+     Function return type "type[BuildsWithSig[type[R@__call__], P@__call__]]" is incompatible with type "type[Builds[type[BuildsWithSig[type[R@__call__], P@__call__]]]] | type[ZenPartialBuilds[type[BuildsWithSig[type[R@__call__], P@__call__]]]] | type[HydraPartialBuilds[type[BuildsWithSig[type[R@__call__], P@__call__]]]] | type[BuildsWithSig[type[BuildsWithSig[type[R@__call__], P@__call__]], P@__call__]]"
+       Type "type[BuildsWithSig[type[R@__call__], P@__call__]]" is incompatible with type "type[Builds[type[BuildsWithSig[type[R@__call__], P@__call__]]]] | type[ZenPartialBuilds[type[BuildsWithSig[type[R@__call__], P@__call__]]]] | type[HydraPartialBuilds[type[BuildsWithSig[type[R@__call__], P@__call__]]]] | type[BuildsWithSig[type[BuildsWithSig[type[R@__call__], P@__call__]], P@__call__]]"
+         "type[BuildsWithSig[type[R@__call__], P@__call__]]" is incompatible with "type[Builds[type[BuildsWithSig[type[R@__call__], P@__call__]]]]"
+         Type "type[BuildsWithSig[type[R@__call__], P@__call__]]" is incompatible with type "type[Builds[type[BuildsWithSig[type[R@__call__], P@__call__]]]]"

... (truncated 6 lines) ...

trio (https://github.com/python-trio/trio)
+   /tmp/mypy_primer/projects/trio/src/trio/_core/_tests/test_guest_mode.py:451:38 - error: Argument of type "(callback: (*_Ts@call_soon_threadsafe) -> object, *args: *_Ts@call_soon_threadsafe) -> Handle" cannot be assigned to parameter "run_sync_soon_threadsafe" of type "(() -> object) -> object" in function "start_guest_run"
+     Type "(callback: (*_Ts@call_soon_threadsafe) -> object, *args: *_Ts@call_soon_threadsafe) -> Handle" is incompatible with type "(() -> object) -> object"
+       Parameter 1: type "() -> object" is incompatible with type "(*_Ts@call_soon_threadsafe) -> object"
+         Type "() -> object" is incompatible with type "(*_Ts@call_soon_threadsafe) -> object"
+           Parameter 1: type "*_Ts@call_soon_threadsafe" is incompatible with type "*tuple[()]"
+             "*tuple[object, ...]" is incompatible with "*tuple[()]" (reportArgumentType)
-     Type "*tuple[(fd: int | _HasFileNo) -> Coroutine[Any, Any, None], socket]" is incompatible with type "*tuple[(**ArgsT@allow_OSError) -> Awaitable[object]]" (reportArgumentType)
+     Type "*tuple[(fd: int | _HasFileNo) -> Coroutine[Any, Any, None], socket]" is incompatible with type "*tuple[(**ArgsT@allow_OSError) -> Awaitable[object]]"
+       "*tuple[(fd: int | _HasFileNo) -> Coroutine[Any, Any, None], socket]" is incompatible with "*tuple[(**ArgsT@allow_OSError) -> Awaitable[object]]"
+         Tuple size mismatch; expected 1 but received 2 (reportArgumentType)
-     Type "*tuple[(fd: int | _HasFileNo) -> Coroutine[Any, Any, None], socket]" is incompatible with type "*tuple[(**ArgsT@allow_OSError) -> Awaitable[object]]" (reportArgumentType)
+     Type "*tuple[(fd: int | _HasFileNo) -> Coroutine[Any, Any, None], socket]" is incompatible with type "*tuple[(**ArgsT@allow_OSError) -> Awaitable[object]]"
+       "*tuple[(fd: int | _HasFileNo) -> Coroutine[Any, Any, None], socket]" is incompatible with "*tuple[(**ArgsT@allow_OSError) -> Awaitable[object]]"
+         Tuple size mismatch; expected 1 but received 2 (reportArgumentType)

... (truncated 20 lines) ...```