microsoft / pyright

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

Fixed regression that resulted in a hang when determining whether an … #8705

Closed erictraut closed 1 month ago

erictraut commented 1 month ago

…overload implementation with generics was compatible with its overloads. This addresses #8687.

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/from_thread.py:305:9 - error: Overloaded implementation is not consistent with signature of overload 2
-     Function return type "Future[T_Retval@start_task_soon]" is incompatible with type "Future[Awaitable[T_Retval@start_task_soon] | T_Retval@start_task_soon]"
-       "Future[T_Retval@start_task_soon]" is incompatible with "Future[Awaitable[T_Retval@start_task_soon] | T_Retval@start_task_soon]"
-         Type parameter "_T@Future" is invariant, but "T_Retval@start_task_soon" is not the same as "Awaitable[T_Retval@start_task_soon] | T_Retval@start_task_soon" (reportInconsistentOverload)
- 31 errors, 1 warning, 0 informations 
+ 30 errors, 1 warning, 0 informations 

starlette (https://github.com/encode/starlette)
-   /tmp/mypy_primer/projects/starlette/starlette/config.py:92:9 - error: Overloaded implementation is not consistent with signature of overload 2
-     Type "(self: Self@Config, key: str, cast: ((Any) -> Any) | None = None, default: Any = undefined) -> Any" is incompatible with type "(self: Self@Config, key: str, cast: type[T@__call__], default: T@__call__ = ...) -> T@__call__"
-       Parameter 3: type "type[T@__call__]" is incompatible with type "((Any) -> Any) | None"
-         Type "((Any) -> Any) | None" is incompatible with type "type[T@__call__]"
-         Type "(Any) -> Any" is incompatible with type "type[T@__call__]"
-         Type "None" is incompatible with type "type[T@__call__]" (reportInconsistentOverload)
- 85 errors, 3 warnings, 0 informations 
+ 84 errors, 3 warnings, 0 informations 

steam.py (https://github.com/Gobot1234/steam.py)
+   /tmp/mypy_primer/projects/steam.py/steam/ext/commands/cog.py:37:9 - error: Overloaded implementation is not consistent with signature of overload 2
+     Type "(self: Self@CogCommands, instance: Cog[Bot] | None, owner: type[Cog[Bot]]) -> Any" is incompatible with type "(self: Self@CogCommands, instance: CogT@__get__, owner: type[CogT@__get__]) -> set[Command[CogT@__get__, ..., Any]]"
+       Parameter 2: type "CogT@__get__" is incompatible with type "Cog[Bot] | None"
+       Parameter 3: type "type[CogT@__get__]" is incompatible with type "type[Cog[Bot]]"
+         Type "type[Cog[Bot]]* | type[Bot]* | type[None]*" is incompatible with type "type[Cog[Bot]]"
+           "type[Bot]*" is incompatible with "type[Cog[Bot]]"
+           Type "type[Bot]*" is incompatible with type "type[Cog[Bot]]" (reportInconsistentOverload)
+   /tmp/mypy_primer/projects/steam.py/steam/ext/commands/cog.py:53:9 - error: Overloaded implementation is not consistent with signature of overload 1
+     Type "(self: Self@CogListeners, instance: Cog[Bot] | None, owner: type[Cog[Bot]]) -> Any" is incompatible with type "(self: Self@CogListeners, instance: None, owner: type[CogT@__get__]) -> list[tuple[str, UnboundListenerType[CogT@__get__]]]"
+       Parameter 3: type "type[CogT@__get__]" is incompatible with type "type[Cog[Bot]]"
+         Type "type[Cog[Bot]]* | type[Bot]* | type[None]*" is incompatible with type "type[Cog[Bot]]"
+           "type[Bot]*" is incompatible with "type[Cog[Bot]]"
+           Type "type[Bot]*" is incompatible with type "type[Cog[Bot]]" (reportInconsistentOverload)
-   /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)
- 8467 errors, 95 warnings, 0 informations 
+ 8468 errors, 95 warnings, 0 informations 

xarray (https://github.com/pydata/xarray)
+   /tmp/mypy_primer/projects/xarray/xarray/core/alignment.py:678:5 - error: Overloaded implementation is not consistent with signature of overload 2
+     Function return type "tuple[T_Obj1@align, T_Obj2@align]" is incompatible with type "tuple[T_Obj1@align, ...]"
+       "tuple[T_Obj1@align, T_Obj2@align]" is incompatible with "tuple[T_Obj1@align, ...]"
+         Tuple entry 1 is incorrect type
+           Type "T_Obj1@align | T_Obj2@align" is incompatible with type "T_Obj1@align" (reportInconsistentOverload)
+   /tmp/mypy_primer/projects/xarray/xarray/core/alignment.py:678:5 - error: Overloaded implementation is not consistent with signature of overload 3
+     Function return type "tuple[T_Obj1@align, T_Obj2@align, T_Obj3@align]" is incompatible with type "tuple[T_Obj1@align, ...]"
+       "tuple[T_Obj1@align, T_Obj2@align, T_Obj3@align]" is incompatible with "tuple[T_Obj1@align, ...]"
+         Tuple entry 1 is incorrect type
+           Type "T_Obj1@align | T_Obj2@align | T_Obj3@align" is incompatible with type "T_Obj1@align" (reportInconsistentOverload)
+   /tmp/mypy_primer/projects/xarray/xarray/core/alignment.py:678:5 - error: Overloaded implementation is not consistent with signature of overload 4
+     Function return type "tuple[T_Obj1@align, T_Obj2@align, T_Obj3@align, T_Obj4@align]" is incompatible with type "tuple[T_Obj1@align, ...]"
+       "tuple[T_Obj1@align, T_Obj2@align, T_Obj3@align, T_Obj4@align]" is incompatible with "tuple[T_Obj1@align, ...]"
+         Tuple entry 1 is incorrect type
+           Type "T_Obj1@align | T_Obj2@align | T_Obj3@align | T_Obj4@align" is incompatible with type "T_Obj1@align" (reportInconsistentOverload)
+   /tmp/mypy_primer/projects/xarray/xarray/core/alignment.py:678:5 - error: Overloaded implementation is not consistent with signature of overload 5
+     Function return type "tuple[T_Obj1@align, T_Obj2@align, T_Obj3@align, T_Obj4@align, T_Obj5@align]" is incompatible with type "tuple[T_Obj1@align, ...]"
+       "tuple[T_Obj1@align, T_Obj2@align, T_Obj3@align, T_Obj4@align, T_Obj5@align]" is incompatible with "tuple[T_Obj1@align, ...]"
+         Tuple entry 1 is incorrect type
+           Type "T_Obj1@align | T_Obj2@align | T_Obj3@align | T_Obj4@align | T_Obj5@align" is incompatible with type "T_Obj1@align" (reportInconsistentOverload)
+   /tmp/mypy_primer/projects/xarray/xarray/core/alignment.py:1144:5 - error: Overloaded implementation is not consistent with signature of overload 2
+     Function return type "tuple[T_Obj1@broadcast, T_Obj2@broadcast]" is incompatible with type "tuple[T_Obj1@broadcast, ...]"
+       "tuple[T_Obj1@broadcast, T_Obj2@broadcast]" is incompatible with "tuple[T_Obj1@broadcast, ...]"
+         Tuple entry 1 is incorrect type
+           Type "T_Obj1@broadcast | T_Obj2@broadcast" is incompatible with type "T_Obj1@broadcast" (reportInconsistentOverload)
+   /tmp/mypy_primer/projects/xarray/xarray/core/alignment.py:1144:5 - error: Overloaded implementation is not consistent with signature of overload 3
+     Function return type "tuple[T_Obj1@broadcast, T_Obj2@broadcast, T_Obj3@broadcast]" is incompatible with type "tuple[T_Obj1@broadcast, ...]"
+       "tuple[T_Obj1@broadcast, T_Obj2@broadcast, T_Obj3@broadcast]" is incompatible with "tuple[T_Obj1@broadcast, ...]"
+         Tuple entry 1 is incorrect type
+           Type "T_Obj1@broadcast | T_Obj2@broadcast | T_Obj3@broadcast" is incompatible with type "T_Obj1@broadcast" (reportInconsistentOverload)
+   /tmp/mypy_primer/projects/xarray/xarray/core/alignment.py:1144:5 - error: Overloaded implementation is not consistent with signature of overload 4
+     Function return type "tuple[T_Obj1@broadcast, T_Obj2@broadcast, T_Obj3@broadcast, T_Obj4@broadcast]" is incompatible with type "tuple[T_Obj1@broadcast, ...]"
+       "tuple[T_Obj1@broadcast, T_Obj2@broadcast, T_Obj3@broadcast, T_Obj4@broadcast]" is incompatible with "tuple[T_Obj1@broadcast, ...]"
+         Tuple entry 1 is incorrect type
+           Type "T_Obj1@broadcast | T_Obj2@broadcast | T_Obj3@broadcast | T_Obj4@broadcast" is incompatible with type "T_Obj1@broadcast" (reportInconsistentOverload)
+   /tmp/mypy_primer/projects/xarray/xarray/core/alignment.py:1144:5 - error: Overloaded implementation is not consistent with signature of overload 5
+     Function return type "tuple[T_Obj1@broadcast, T_Obj2@broadcast, T_Obj3@broadcast, T_Obj4@broadcast, T_Obj5@broadcast]" is incompatible with type "tuple[T_Obj1@broadcast, ...]"
+       "tuple[T_Obj1@broadcast, T_Obj2@broadcast, T_Obj3@broadcast, T_Obj4@broadcast, T_Obj5@broadcast]" is incompatible with "tuple[T_Obj1@broadcast, ...]"
+         Tuple entry 1 is incorrect type
+           Type "T_Obj1@broadcast | T_Obj2@broadcast | T_Obj3@broadcast | T_Obj4@broadcast | T_Obj5@broadcast" is incompatible with type "T_Obj1@broadcast" (reportInconsistentOverload)
-   /tmp/mypy_primer/projects/xarray/xarray/core/utils.py:471:9 - error: Overloaded implementation is not consistent with signature of overload 2
-     Function return type "V@FrozenMappingWarningOnValuesAccess | T@get" is incompatible with type "V@FrozenMappingWarningOnValuesAccess | None" (reportInconsistentOverload)
- 2393 errors, 108 warnings, 0 informations 
+ 2400 errors, 108 warnings, 0 informations 

discord.py (https://github.com/Rapptz/discord.py)
- /tmp/mypy_primer/projects/discord.py/discord/app_commands/translator.py
-   /tmp/mypy_primer/projects/discord.py/discord/app_commands/translator.py:112:60 - warning: Unnecessary "# type: ignore" comment (reportUnnecessaryTypeIgnoreComment)
+   /tmp/mypy_primer/projects/discord.py/discord/ext/commands/core.py:1712:13 - error: Overloaded implementation is not consistent with signature of overload 1
+     Type "(self: Self@_CommandDecorator, func: (...) -> Coro[T@__call__], /) -> Any" is incompatible with type "(self: Self@_CommandDecorator, func: (CogT@__call__, ContextT@__call__, **P@__call__) -> Coro[T@__call__], /) -> Command[CogT@__call__, P@__call__, T@__call__]"
+       Parameter 2: type "(CogT@__call__, ContextT@__call__, **P@__call__) -> Coro[T@__call__]" is incompatible with type "(...) -> Coro[T@__call__]"
+         Type "(CogT@__call__, ContextT@__call__, **P@__call__) -> Coro[T@__call__]" is incompatible with type "(...) -> Coro[T@__call__]" (reportInconsistentOverload)
+   /tmp/mypy_primer/projects/discord.py/discord/ext/commands/core.py:1712:13 - error: Overloaded implementation is not consistent with signature of overload 2
+     Type "(self: Self@_CommandDecorator, func: (...) -> Coro[T@__call__], /) -> Any" is incompatible with type "(self: Self@_CommandDecorator, func: (ContextT@__call__, **P@__call__) -> Coro[T@__call__], /) -> Command[None, P@__call__, T@__call__]"
+       Parameter 2: type "(ContextT@__call__, **P@__call__) -> Coro[T@__call__]" is incompatible with type "(...) -> Coro[T@__call__]"
+         Type "(ContextT@__call__, **P@__call__) -> Coro[T@__call__]" is incompatible with type "(...) -> Coro[T@__call__]" (reportInconsistentOverload)
+   /tmp/mypy_primer/projects/discord.py/discord/ext/commands/core.py:1724:13 - error: Overloaded implementation is not consistent with signature of overload 1
+     Type "(self: Self@_GroupDecorator, func: (...) -> Coro[T@__call__], /) -> Any" is incompatible with type "(self: Self@_GroupDecorator, func: (CogT@__call__, ContextT@__call__, **P@__call__) -> Coro[T@__call__], /) -> Group[CogT@__call__, P@__call__, T@__call__]"
+       Parameter 2: type "(CogT@__call__, ContextT@__call__, **P@__call__) -> Coro[T@__call__]" is incompatible with type "(...) -> Coro[T@__call__]"
+         Type "(CogT@__call__, ContextT@__call__, **P@__call__) -> Coro[T@__call__]" is incompatible with type "(...) -> Coro[T@__call__]" (reportInconsistentOverload)
+   /tmp/mypy_primer/projects/discord.py/discord/ext/commands/core.py:1724:13 - error: Overloaded implementation is not consistent with signature of overload 2
+     Type "(self: Self@_GroupDecorator, func: (...) -> Coro[T@__call__], /) -> Any" is incompatible with type "(self: Self@_GroupDecorator, func: (ContextT@__call__, **P@__call__) -> Coro[T@__call__], /) -> Group[None, P@__call__, T@__call__]"
+       Parameter 2: type "(ContextT@__call__, **P@__call__) -> Coro[T@__call__]" is incompatible with type "(...) -> Coro[T@__call__]"
+         Type "(ContextT@__call__, **P@__call__) -> Coro[T@__call__]" is incompatible with type "(...) -> Coro[T@__call__]" (reportInconsistentOverload)
- 104 errors, 91 warnings, 0 informations 
+ 108 errors, 90 warnings, 0 informations 

ibis (https://github.com/ibis-project/ibis)
+             Function return type "F@deferrable" is incompatible with type "_Wrapped[..., Unknown, ..., Deferred | Unknown]"

zulip (https://github.com/zulip/zulip)
+   /tmp/mypy_primer/projects/zulip/zerver/lib/partial.py:36:9 - error: Overloaded implementation is not consistent with signature of overload 1
+     Type "(func: (...) -> R@partial, /, *args: object) -> ((...) -> R@partial)" is incompatible with type "(func: (**P@partial) -> R@partial, /) -> ((**P@partial) -> R@partial)"
+       Parameter 1: type "(**P@partial) -> R@partial" is incompatible with type "(...) -> R@partial"
+         Type "(**P@partial) -> R@partial" is incompatible with type "(...) -> R@partial" (reportInconsistentOverload)
+   /tmp/mypy_primer/projects/zulip/zerver/lib/partial.py:36:9 - error: Overloaded implementation is not consistent with signature of overload 2
+     Type "(func: (...) -> R@partial, /, *args: object) -> ((...) -> R@partial)" is incompatible with type "(func: (T1@partial, **P@partial) -> R@partial, arg1: T1@partial, /) -> ((**P@partial) -> R@partial)"
+       Parameter 1: type "(T1@partial, **P@partial) -> R@partial" is incompatible with type "(...) -> R@partial"
+         Type "(T1@partial, **P@partial) -> R@partial" is incompatible with type "(...) -> R@partial" (reportInconsistentOverload)
+   /tmp/mypy_primer/projects/zulip/zerver/lib/partial.py:36:9 - error: Overloaded implementation is not consistent with signature of overload 3
+     Type "(func: (...) -> R@partial, /, *args: object) -> ((...) -> R@partial)" is incompatible with type "(func: (T1@partial, T2@partial, **P@partial) -> R@partial, arg1: T1@partial, arg2: T2@partial, /) -> ((**P@partial) -> R@partial)"
+       Parameter 1: type "(T1@partial, T2@partial, **P@partial) -> R@partial" is incompatible with type "(...) -> R@partial"
+         Type "(T1@partial, T2@partial, **P@partial) -> R@partial" is incompatible with type "(...) -> R@partial" (reportInconsistentOverload)
+   /tmp/mypy_primer/projects/zulip/zerver/lib/partial.py:36:9 - error: Overloaded implementation is not consistent with signature of overload 4
+     Type "(func: (...) -> R@partial, /, *args: object) -> ((...) -> R@partial)" is incompatible with type "(func: (T1@partial, T2@partial, T3@partial, **P@partial) -> R@partial, arg1: T1@partial, arg2: T2@partial, arg3: T3@partial, /) -> ((**P@partial) -> R@partial)"
+       Parameter 1: type "(T1@partial, T2@partial, T3@partial, **P@partial) -> R@partial" is incompatible with type "(...) -> R@partial"
+         Type "(T1@partial, T2@partial, T3@partial, **P@partial) -> R@partial" is incompatible with type "(...) -> R@partial" (reportInconsistentOverload)
+   /tmp/mypy_primer/projects/zulip/zerver/lib/partial.py:36:9 - error: Overloaded implementation is not consistent with signature of overload 5
+     Type "(func: (...) -> R@partial, /, *args: object) -> ((...) -> R@partial)" is incompatible with type "(func: (T1@partial, T2@partial, T3@partial, T4@partial, **P@partial) -> R@partial, arg1: T1@partial, arg2: T2@partial, arg3: T3@partial, arg4: T4@partial, /) -> ((**P@partial) -> R@partial)"
+       Parameter 1: type "(T1@partial, T2@partial, T3@partial, T4@partial, **P@partial) -> R@partial" is incompatible with type "(...) -> R@partial"
+         Type "(T1@partial, T2@partial, T3@partial, T4@partial, **P@partial) -> R@partial" is incompatible with type "(...) -> R@partial" (reportInconsistentOverload)
- 4573 errors, 452 warnings, 0 informations 
+ 4578 errors, 452 warnings, 0 informations 

prefect (https://github.com/PrefectHQ/prefect)
+   /tmp/mypy_primer/projects/prefect/src/integrations/prefect-dask/prefect_dask/task_runners.py:337:9 - error: Overloaded implementation is not consistent with signature of overload 1
+     Type "(self: Self@DaskTaskRunner, task: Task[..., Unknown], parameters: Dict[str, Any], wait_for: Iterable[PrefectFuture[Unknown]] | None = None, dependencies: Dict[str, Set[TaskRunInput]] | None = None) -> PrefectDaskFuture[Unknown]" is incompatible with type "(self: Self@DaskTaskRunner, task: Task[P@submit, Coroutine[Any, Any, R@submit]], parameters: Dict[str, Any], wait_for: Iterable[PrefectFuture[Unknown]] | None = None, dependencies: Dict[str, Set[TaskRunInput]] | None = None) -> PrefectDaskFuture[R@submit]"
+       Parameter 2: type "Task[P@submit, Coroutine[Any, Any, R@submit]]" is incompatible with type "Task[..., Unknown]"
+         "Task[P@submit, Coroutine[Any, Any, R@submit]]" is incompatible with "Task[..., Unknown]"
+           Type parameter "P@Task" is invariant, but "P@submit" is not the same as "..." (reportInconsistentOverload)
+     Type "(self: Self@DaskTaskRunner, task: Task[..., Unknown], parameters: Dict[str, Any], wait_for: Iterable[PrefectFuture[Unknown]] | None = None) -> PrefectFutureList[PrefectConcurrentFuture[Unknown]]" is incompatible with type "(self: Self@DaskTaskRunner, task: Task[P@map, Coroutine[Any, Any, R@map]], parameters: Dict[str, Any], wait_for: Iterable[PrefectFuture[Unknown]] | None = None) -> PrefectFutureList[PrefectDaskFuture[R@map]]"
+       Parameter 2: type "Task[P@map, Coroutine[Any, Any, R@map]]" is incompatible with type "Task[..., Unknown]"
+         "Task[P@map, Coroutine[Any, Any, R@map]]" is incompatible with "Task[..., Unknown]"
+           Type parameter "P@Task" is invariant, but "P@map" is not the same as "..."
-     Function return type "PrefectFutureList[PrefectDaskFuture[R@map]]" is incompatible with type "PrefectFutureList[PrefectConcurrentFuture[Unknown]]"
+       Function return type "PrefectFutureList[PrefectDaskFuture[R@map]]" is incompatible with type "PrefectFutureList[PrefectConcurrentFuture[Unknown]]"
-       "PrefectFutureList[PrefectDaskFuture[R@map]]" is incompatible with "PrefectFutureList[PrefectConcurrentFuture[Unknown]]"
+         "PrefectFutureList[PrefectDaskFuture[R@map]]" is incompatible with "PrefectFutureList[PrefectConcurrentFuture[Unknown]]"
-         Type parameter "F@PrefectFutureList" is invariant, but "PrefectDaskFuture[R@map]" is not the same as "PrefectConcurrentFuture[Unknown]" (reportInconsistentOverload)
+           Type parameter "F@PrefectFutureList" is invariant, but "PrefectDaskFuture[R@map]" is not the same as "PrefectConcurrentFuture[Unknown]" (reportInconsistentOverload)
+   /tmp/mypy_primer/projects/prefect/src/integrations/prefect-ray/prefect_ray/task_runners.py:259:9 - error: Overloaded implementation is not consistent with signature of overload 1
+     Type "(self: Self@RayTaskRunner, task: Task[..., Unknown], parameters: Dict[str, Any], wait_for: Iterable[PrefectFuture[Unknown]] | None = None, dependencies: Dict[str, Set[TaskRunInput]] | None = None) -> PrefectRayFuture[Unknown]" is incompatible with type "(self: Self@RayTaskRunner, task: Task[P@submit, Coroutine[Any, Any, R@submit]], parameters: Dict[str, Any], wait_for: Iterable[PrefectFuture[Unknown]] | None = None, dependencies: Dict[str, Set[TaskRunInput]] | None = None) -> PrefectRayFuture[R@submit]"
+       Parameter 2: type "Task[P@submit, Coroutine[Any, Any, R@submit]]" is incompatible with type "Task[..., Unknown]"
+         "Task[P@submit, Coroutine[Any, Any, R@submit]]" is incompatible with "Task[..., Unknown]"
+           Type parameter "P@Task" is invariant, but "P@submit" is not the same as "..." (reportInconsistentOverload)
+   /tmp/mypy_primer/projects/prefect/src/integrations/prefect-ray/prefect_ray/task_runners.py:316:9 - error: Overloaded implementation is not consistent with signature of overload 1
+     Type "(self: Self@RayTaskRunner, task: Task[..., Unknown], parameters: Dict[str, Any], wait_for: Iterable[PrefectFuture[Unknown]] | None = None) -> PrefectFutureList[PrefectRayFuture[Unknown]]" is incompatible with type "(self: Self@RayTaskRunner, task: Task[P@map, Coroutine[Any, Any, R@map]], parameters: Dict[str, Any], wait_for: Iterable[PrefectFuture[Unknown]] | None = None) -> PrefectFutureList[PrefectRayFuture[R@map]]"
+       Parameter 2: type "Task[P@map, Coroutine[Any, Any, R@map]]" is incompatible with type "Task[..., Unknown]"
+         "Task[P@map, Coroutine[Any, Any, R@map]]" is incompatible with "Task[..., Unknown]"
+           Type parameter "P@Task" is invariant, but "P@map" is not the same as "..." (reportInconsistentOverload)
+   /tmp/mypy_primer/projects/prefect/src/prefect/flows.py:1298:9 - error: Overloaded implementation is not consistent with signature of overload 4
+     Type "(self: Self@Flow[P@Flow, R@Flow], *args: P@Flow.args, return_state: bool = False, wait_for: Iterable[PrefectFuture[Unknown]] | None = None, **kwargs: P@Flow.kwargs) -> (Coroutine[Any, Any, Awaitable[Any]] | Any | R@Flow | State[Any] | None)" is incompatible with type "(self: Flow[P@Flow, T@__call__], *args: P@Flow.args, return_state: Literal[True], **kwargs: P@Flow.kwargs) -> State[T@__call__]"
+       Parameter 1: type "Flow[P@Flow, T@__call__]" is incompatible with type "Self@Flow[P@Flow, R@Flow]"
+         Type "Flow[P@Flow, T@__call__]" is incompatible with type "Self@Flow[P@Flow, R@Flow]"
+       Parameter 4: type "P@Flow.kwargs" is incompatible with type "Iterable[PrefectFuture[Unknown]] | None"
+         Type "dict[str, object]" is incompatible with type "Iterable[PrefectFuture[Unknown]] | None"
+           "dict[str, object]" is incompatible with "Iterable[PrefectFuture[Unknown]]"
+             Type parameter "_T_co@Iterable" is covariant, but "str" is not a subtype of "PrefectFuture[Unknown]"
+           "dict[str, object]" is incompatible with "None" (reportInconsistentOverload)
+   /tmp/mypy_primer/projects/prefect/src/prefect/flows.py:1470:5 - error: Overloaded implementation is not consistent with signature of overload 2
+     Function return type "((**P@flow) -> R@flow) -> Flow[P@flow, R@flow]" is incompatible with type "Flow[P, R] | ((((**P) -> R)) -> Flow[P, R])"
+       Type "((**P@flow) -> R@flow) -> Flow[P@flow, R@flow]" is incompatible with type "Flow[P, R] | ((((**P) -> R)) -> Flow[P, R])"
+         "function" is incompatible with "Flow[P, R]"
+         Type "((**P@flow) -> R@flow) -> Flow[P@flow, R@flow]" is incompatible with type "((**P) -> R) -> Flow[P, R]"
+           Parameter 1: type "(**P) -> R" is incompatible with type "(**P@flow) -> R@flow"
+             Type "(**P) -> R" is incompatible with type "(**P@flow) -> R@flow" (reportInconsistentOverload)
+   /tmp/mypy_primer/projects/prefect/src/prefect/task_runners.py:249:9 - error: Overloaded implementation is not consistent with signature of overload 1
+     Type "(self: Self@ThreadPoolTaskRunner, task: Task[..., Unknown], parameters: Dict[str, Any], wait_for: Iterable[PrefectFuture[Unknown]] | None = None, dependencies: Dict[str, Set[TaskRunInput]] | None = None) -> PrefectConcurrentFuture[Unknown]" is incompatible with type "(self: Self@ThreadPoolTaskRunner, task: Task[P@submit, Coroutine[Any, Any, R@submit]], parameters: Dict[str, Any], wait_for: Iterable[PrefectFuture[Unknown]] | None = None, dependencies: Dict[str, Set[TaskRunInput]] | None = None) -> PrefectConcurrentFuture[R@submit]"
+       Parameter 2: type "Task[P@submit, Coroutine[Any, Any, R@submit]]" is incompatible with type "Task[..., Unknown]"
+         "Task[P@submit, Coroutine[Any, Any, R@submit]]" is incompatible with "Task[..., Unknown]"
+           Type parameter "P@Task" is invariant, but "P@submit" is not the same as "..." (reportInconsistentOverload)
+   /tmp/mypy_primer/projects/prefect/src/prefect/task_runners.py:334:9 - error: Overloaded implementation is not consistent with signature of overload 1
+     Type "(self: Self@ThreadPoolTaskRunner, task: Task[..., Unknown], parameters: Dict[str, Any], wait_for: Iterable[PrefectFuture[Unknown]] | None = None) -> PrefectFutureList[PrefectConcurrentFuture[Unknown]]" is incompatible with type "(self: Self@ThreadPoolTaskRunner, task: Task[P@map, Coroutine[Any, Any, R@map]], parameters: Dict[str, Any], wait_for: Iterable[PrefectFuture[Unknown]] | None = None) -> PrefectFutureList[PrefectConcurrentFuture[R@map]]"
+       Parameter 2: type "Task[P@map, Coroutine[Any, Any, R@map]]" is incompatible with type "Task[..., Unknown]"
+         "Task[P@map, Coroutine[Any, Any, R@map]]" is incompatible with "Task[..., Unknown]"
+           Type parameter "P@Task" is invariant, but "P@map" is not the same as "..." (reportInconsistentOverload)
+   /tmp/mypy_primer/projects/prefect/src/prefect/task_runners.py:400:9 - error: Overloaded implementation is not consistent with signature of overload 1
+     Type "(self: Self@PrefectTaskRunner, task: Task[..., Unknown], parameters: Dict[str, Any], wait_for: Iterable[PrefectFuture[Unknown]] | None = None, dependencies: Dict[str, Set[TaskRunInput]] | None = None) -> PrefectDistributedFuture[Unknown]" is incompatible with type "(self: Self@PrefectTaskRunner, task: Task[P@submit, Coroutine[Any, Any, R@submit]], parameters: Dict[str, Any], wait_for: Iterable[PrefectFuture[Unknown]] | None = None, dependencies: Dict[str, Set[TaskRunInput]] | None = None) -> PrefectDistributedFuture[R@submit]"
+       Parameter 2: type "Task[P@submit, Coroutine[Any, Any, R@submit]]" is incompatible with type "Task[..., Unknown]"
+         "Task[P@submit, Coroutine[Any, Any, R@submit]]" is incompatible with "Task[..., Unknown]"
+           Type parameter "P@Task" is invariant, but "P@submit" is not the same as "..." (reportInconsistentOverload)
+   /tmp/mypy_primer/projects/prefect/src/prefect/task_runners.py:455:9 - error: Overloaded implementation is not consistent with signature of overload 1

... (truncated 68 lines) ...