Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changed type checking logic to retain a reference to default expressi… #8783

Merged
merged 1 commit into from
Aug 19, 2024

Conversation

erictraut
Copy link
Collaborator

…ons in function signatures, including synthesized signatures (such as __init__ methods in dataclasses). This allows the original default value expression to be printed in error messages and language server strings. This addresses #8781.

…ons in function signatures, including synthesized signatures (such as `__init__` methods in dataclasses). This allows the original default value expression to be printed in error messages and language server strings. This addresses #8781.
Copy link
Contributor

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

dedupe (https://github.com/dedupeio/dedupe)
-     Expression of type "tuple[(x: Unknown, target: Unknown | None = ...) -> frozenset[Literal[1]]]" cannot be assigned to attribute "predicates" of class "Fingerprinter"
+     Expression of type "tuple[(x: Unknown, target: Unknown | None = None) -> frozenset[Literal[1]]]" cannot be assigned to attribute "predicates" of class "Fingerprinter"
-       "tuple[(x: Unknown, target: Unknown | None = ...) -> frozenset[Literal[1]]]" is incompatible with "Iterable[Predicate]"
+       "tuple[(x: Unknown, target: Unknown | None = None) -> frozenset[Literal[1]]]" is incompatible with "Iterable[Predicate]"
-         Type parameter "_T_co@Iterable" is covariant, but "(x: Unknown, target: Unknown | None = ...) -> frozenset[Literal[1]]" is not a subtype of "Predicate"
+         Type parameter "_T_co@Iterable" is covariant, but "(x: Unknown, target: Unknown | None = None) -> frozenset[Literal[1]]" is not a subtype of "Predicate"
-   /tmp/mypy_primer/projects/dedupe/tests/test_training.py:77:16 - error: Argument of type "(x: Unknown, target: Unknown | None = ...) -> frozenset[Literal[1]]" cannot be assigned to parameter "key" of type "Predicate" in function "__getitem__"
+   /tmp/mypy_primer/projects/dedupe/tests/test_training.py:77:16 - error: Argument of type "(x: Unknown, target: Unknown | None = None) -> frozenset[Literal[1]]" cannot be assigned to parameter "key" of type "Predicate" in function "__getitem__"

core (https://github.com/home-assistant/core)
-   /tmp/mypy_primer/projects/core/homeassistant/components/rflink/__init__.py:299:56 - error: Argument of type "HassJob[(_: Exception | None = ...), None]" cannot be assigned to parameter "action" of type "HassJob[(datetime), Coroutine[Any, Any, None] | None] | ((datetime) -> (Coroutine[Any, Any, None] | None))" in function "async_call_later"
+   /tmp/mypy_primer/projects/core/homeassistant/components/rflink/__init__.py:299:56 - error: Argument of type "HassJob[(_: Exception | None = None), None]" cannot be assigned to parameter "action" of type "HassJob[(datetime), Coroutine[Any, Any, None] | None] | ((datetime) -> (Coroutine[Any, Any, None] | None))" in function "async_call_later"
-     Type "HassJob[(_: Exception | None = ...), None]" is incompatible with type "HassJob[(datetime), Coroutine[Any, Any, None] | None] | ((datetime) -> (Coroutine[Any, Any, None] | None))"
+     Type "HassJob[(_: Exception | None = None), None]" is incompatible with type "HassJob[(datetime), Coroutine[Any, Any, None] | None] | ((datetime) -> (Coroutine[Any, Any, None] | None))"
-       "HassJob[(_: Exception | None = ...), None]" is incompatible with "HassJob[(datetime), Coroutine[Any, Any, None] | None]"
+       "HassJob[(_: Exception | None = None), None]" is incompatible with "HassJob[(datetime), Coroutine[Any, Any, None] | None]"
-         Type parameter "_P@HassJob" is covariant, but "(_: Exception | None = ...)" is not a subtype of "(datetime)"
+         Type parameter "_P@HassJob" is covariant, but "(_: Exception | None = None)" is not a subtype of "(datetime)"
-           Type "(_: Exception | None = ...)" is incompatible with type "(datetime)"
+           Type "(_: Exception | None = None)" is incompatible with type "(datetime)"
-       Type "HassJob[(_: Exception | None = ...), None]" is incompatible with type "(datetime) -> (Coroutine[Any, Any, None] | None)" (reportArgumentType)
+       Type "HassJob[(_: Exception | None = None), None]" is incompatible with type "(datetime) -> (Coroutine[Any, Any, None] | None)" (reportArgumentType)

antidote (https://github.com/Finistere/antidote)
-     Type of "overriding" is "(__existing_implementation: LazyFunction[(dep: Dep = ...), object] | LazyMethod[(dep: Dep = ...), object] | staticmethod[LazyFunction[(dep: Dep = ...), object], Unknown], /) -> LazyImplementsDecorator[(dep: Dep = ...), object]" (reportUnknownMemberType)
+     Type of "overriding" is "(__existing_implementation: LazyFunction[(dep: Dep = inject.me()), object] | LazyMethod[(dep: Dep = inject.me()), object] | staticmethod[LazyFunction[(dep: Dep = inject.me()), object], Unknown], /) -> LazyImplementsDecorator[(dep: Dep = inject.me()), object]" (reportUnknownMemberType)
-     Type of "overriding" is "(__existing_implementation: LazyFunction[(dep: object = ...), object] | LazyMethod[(dep: object = ...), object] | staticmethod[LazyFunction[(dep: object = ...), object], Unknown], /) -> LazyImplementsDecorator[(dep: object = ...), object]" (reportUnknownMemberType)
+     Type of "overriding" is "(__existing_implementation: LazyFunction[(dep: object = None), object] | LazyMethod[(dep: object = None), object] | staticmethod[LazyFunction[(dep: object = None), object], Unknown], /) -> LazyImplementsDecorator[(dep: object = None), object]" (reportUnknownMemberType)
-     Type of "overriding" is "(__existing_implementation: LazyFunction[(dep: Dep = ...), object] | LazyMethod[(dep: Dep = ...), object] | staticmethod[LazyFunction[(dep: Dep = ...), object], Unknown], /) -> LazyImplementsDecorator[(dep: Dep = ...), object]" (reportUnknownMemberType)
+     Type of "overriding" is "(__existing_implementation: LazyFunction[(dep: Dep = inject.me()), object] | LazyMethod[(dep: Dep = inject.me()), object] | staticmethod[LazyFunction[(dep: Dep = inject.me()), object], Unknown], /) -> LazyImplementsDecorator[(dep: Dep = inject.me()), object]" (reportUnknownMemberType)
-     Type of "overriding" is "(__existing_implementation: LazyFunction[(dep: Dep = ...), object] | LazyMethod[(dep: Dep = ...), object] | staticmethod[LazyFunction[(dep: Dep = ...), object], Unknown], /) -> LazyImplementsDecorator[(dep: Dep = ...), object]" (reportUnknownMemberType)
+     Type of "overriding" is "(__existing_implementation: LazyFunction[(dep: Dep = inject.me()), object] | LazyMethod[(dep: Dep = inject.me()), object] | staticmethod[LazyFunction[(dep: Dep = inject.me()), object], Unknown], /) -> LazyImplementsDecorator[(dep: Dep = inject.me()), object]" (reportUnknownMemberType)

dd-trace-py (https://github.com/DataDog/dd-trace-py)
-   /tmp/mypy_primer/projects/dd-trace-py/ddtrace/internal/compat.py:417:28 - error: Expression of type "type[nullcontext[_T@nullcontext]]" is incompatible with declared type "(enter_result: Unknown | None = ...) -> _GeneratorContextManager[Unknown | None]"
+   /tmp/mypy_primer/projects/dd-trace-py/ddtrace/internal/compat.py:417:28 - error: Expression of type "type[nullcontext[_T@nullcontext]]" is incompatible with declared type "(enter_result: Unknown | None = None) -> _GeneratorContextManager[Unknown | None]"
-     No overloaded function matches type "(enter_result: Unknown | None = ...) -> _GeneratorContextManager[Unknown | None]" (reportAssignmentType)
+     No overloaded function matches type "(enter_result: Unknown | None = None) -> _GeneratorContextManager[Unknown | None]" (reportAssignmentType)

ibis (https://github.com/ibis-project/ibis)
-   /tmp/mypy_primer/projects/ibis/ibis/expr/types/joins.py:248:9 - error: "join" overrides method of same name in class "Table" with incompatible type "_Wrapped[(left: Table, right: Table, predicates: str | Sequence[str | BooleanColumn | tuple[str | Column | Deferred, str | Column | Deferred] | bool] = ..., how: JoinKind = ..., *, lname: str = ..., rname: str = ...), Table, (self: Join, right: Unknown, predicates: Any, how: JoinKind = ..., *, lname: str = ..., rname: str = ...), Join]" (reportIncompatibleMethodOverride)
+   /tmp/mypy_primer/projects/ibis/ibis/expr/types/joins.py:248:9 - error: "join" overrides method of same name in class "Table" with incompatible type "_Wrapped[(left: Table, right: Table, predicates: str | Sequence[str | BooleanColumn | tuple[str | Column | Deferred, str | Column | Deferred] | bool] = (), how: JoinKind = "inner", *, lname: str = "", rname: str = "{name}_right"), Table, (self: Join, right: Unknown, predicates: Any, how: JoinKind = "inner", *, lname: str = "", rname: str = "{name}_right"), Join]" (reportIncompatibleMethodOverride)
-   /tmp/mypy_primer/projects/ibis/ibis/expr/types/joins.py:300:9 - error: "asof_join" overrides method of same name in class "Table" with incompatible type "_Wrapped[(left: Table, right: Table, on: str | BooleanColumn, predicates: str | Column | Sequence[str | Column] = ..., tolerance: str | IntervalScalar | None = ..., *, lname: str = ..., rname: str = ...), Table, (self: Table, right: Table, on: Unknown, predicates: Unknown = ..., tolerance: Unknown | None = ..., *, lname: str = ..., rname: str = ...), Table]" (reportIncompatibleMethodOverride)
+   /tmp/mypy_primer/projects/ibis/ibis/expr/types/joins.py:300:9 - error: "asof_join" overrides method of same name in class "Table" with incompatible type "_Wrapped[(left: Table, right: Table, on: str | BooleanColumn, predicates: str | Column | Sequence[str | Column] = (), tolerance: str | IntervalScalar | None = None, *, lname: str = "", rname: str = "{name}_right"), Table, (self: Table, right: Table, on: Unknown, predicates: Unknown = (), tolerance: Unknown | None = None, *, lname: str = "", rname: str = "{name}_right"), Table]" (reportIncompatibleMethodOverride)
-   /tmp/mypy_primer/projects/ibis/ibis/expr/types/joins.py:381:9 - error: "cross_join" overrides method of same name in class "Table" with incompatible type "_Wrapped[(left: Table, right: Table, *rest: Table, lname: str = ..., rname: str = ...), Table, (self: Table, right: Table, *rest: Table, lname: str = ..., rname: str = ...), Table]" (reportIncompatibleMethodOverride)
+   /tmp/mypy_primer/projects/ibis/ibis/expr/types/joins.py:381:9 - error: "cross_join" overrides method of same name in class "Table" with incompatible type "_Wrapped[(left: Table, right: Table, *rest: Table, lname: str = "", rname: str = "{name}_right"), Table, (self: Table, right: Table, *rest: Table, lname: str = "", rname: str = "{name}_right"), Table]" (reportIncompatibleMethodOverride)

setuptools (https://github.com/pypa/setuptools)
-   /tmp/mypy_primer/projects/setuptools/setuptools/_vendor/autocommand/autoparse.py:306:23 - error: Cannot assign to attribute "func" for class "_Wrapped[..., Unknown, (argv: Unknown | None = ...), Unknown]"
+   /tmp/mypy_primer/projects/setuptools/setuptools/_vendor/autocommand/autoparse.py:306:23 - error: Cannot assign to attribute "func" for class "_Wrapped[..., Unknown, (argv: Unknown | None = None), Unknown]"
-   /tmp/mypy_primer/projects/setuptools/setuptools/_vendor/autocommand/autoparse.py:307:23 - error: Cannot assign to attribute "parser" for class "_Wrapped[..., Unknown, (argv: Unknown | None = ...), Unknown]"
+   /tmp/mypy_primer/projects/setuptools/setuptools/_vendor/autocommand/autoparse.py:307:23 - error: Cannot assign to attribute "parser" for class "_Wrapped[..., Unknown, (argv: Unknown | None = None), Unknown]"

hydra-zen (https://github.com/mit-ll-responsible-ai/hydra-zen)
-   /tmp/mypy_primer/projects/hydra-zen/tests/annotations/declarations.py:566:9 - information: Type of "Conf_f(1, "hi")" is "BuildsWithSig[type[C], (x: int, y: str, z: bool = ...)]"
+   /tmp/mypy_primer/projects/hydra-zen/tests/annotations/declarations.py:566:9 - information: Type of "Conf_f(1, "hi")" is "BuildsWithSig[type[C], (x: int, y: str, z: bool = False)]"
+   /tmp/mypy_primer/projects/hydra-zen/tests/annotations/declarations.py:567:23 - error: Type text mismatch; expected "BuildsWithSig[type[C], (x: int, y: str, z: bool = ...)]" but received "BuildsWithSig[type[C], (x: int, y: str, z: bool = False)]" (reportGeneralTypeIssues)
-   /tmp/mypy_primer/projects/hydra-zen/tests/annotations/declarations.py:570:9 - information: Type of "Conf_f(1, "hi", True)" is "BuildsWithSig[type[C], (x: int, y: str, z: bool = ...)]"
+   /tmp/mypy_primer/projects/hydra-zen/tests/annotations/declarations.py:570:9 - information: Type of "Conf_f(1, "hi", True)" is "BuildsWithSig[type[C], (x: int, y: str, z: bool = False)]"
+   /tmp/mypy_primer/projects/hydra-zen/tests/annotations/declarations.py:571:23 - error: Type text mismatch; expected "BuildsWithSig[type[C], (x: int, y: str, z: bool = ...)]" but received "BuildsWithSig[type[C], (x: int, y: str, z: bool = False)]" (reportGeneralTypeIssues)
-   /tmp/mypy_primer/projects/hydra-zen/tests/annotations/declarations.py:574:9 - information: Type of "Conf_f(1, y="hi")" is "BuildsWithSig[type[C], (x: int, y: str, z: bool = ...)]"
+   /tmp/mypy_primer/projects/hydra-zen/tests/annotations/declarations.py:574:9 - information: Type of "Conf_f(1, y="hi")" is "BuildsWithSig[type[C], (x: int, y: str, z: bool = False)]"
+   /tmp/mypy_primer/projects/hydra-zen/tests/annotations/declarations.py:575:23 - error: Type text mismatch; expected "BuildsWithSig[type[C], (x: int, y: str, z: bool = ...)]" but received "BuildsWithSig[type[C], (x: int, y: str, z: bool = False)]" (reportGeneralTypeIssues)
-   /tmp/mypy_primer/projects/hydra-zen/tests/annotations/declarations.py:578:9 - information: Type of "Conf_f(x=1, y="hi", z=False)" is "BuildsWithSig[type[C], (x: int, y: str, z: bool = ...)]"
+   /tmp/mypy_primer/projects/hydra-zen/tests/annotations/declarations.py:578:9 - information: Type of "Conf_f(x=1, y="hi", z=False)" is "BuildsWithSig[type[C], (x: int, y: str, z: bool = False)]"
+   /tmp/mypy_primer/projects/hydra-zen/tests/annotations/declarations.py:579:23 - error: Type text mismatch; expected "BuildsWithSig[type[C], (x: int, y: str, z: bool = ...)]" but received "BuildsWithSig[type[C], (x: int, y: str, z: bool = False)]" (reportGeneralTypeIssues)
-   /tmp/mypy_primer/projects/hydra-zen/tests/annotations/declarations.py:729:9 - information: Type of "Conf" is "type[BuildsWithSig[type[int], (x: int, y: str, z: bool = ...)]]"
+   /tmp/mypy_primer/projects/hydra-zen/tests/annotations/declarations.py:729:9 - information: Type of "Conf" is "type[BuildsWithSig[type[int], (x: int, y: str, z: bool = False)]]"
+   /tmp/mypy_primer/projects/hydra-zen/tests/annotations/declarations.py:730:23 - error: Type text mismatch; expected "type[BuildsWithSig[type[int], (x: int, y: str, z: bool = ...)]]" but received "type[BuildsWithSig[type[int], (x: int, y: str, z: bool = False)]]" (reportGeneralTypeIssues)
- 179 errors, 15 warnings, 183 informations 
+ 184 errors, 15 warnings, 183 informations 

pwndbg (https://github.com/pwndbg/pwndbg)
-   /tmp/mypy_primer/projects/pwndbg/pwndbg/commands/cymbol.py:84:12 - error: Expression of type "_Wrapped[(custom_structure_name: str, custom_structure_path: str = ...), T@__call__ | None, (custom_structure_name: str, custom_structure_path: str = ...), T@wrapper | None]" is incompatible with return type "_OnlyWhenStructFileExists"
+   /tmp/mypy_primer/projects/pwndbg/pwndbg/commands/cymbol.py:84:12 - error: Expression of type "_Wrapped[(custom_structure_name: str, custom_structure_path: str = ""), T@__call__ | None, (custom_structure_name: str, custom_structure_path: str = ""), T@wrapper | None]" is incompatible with return type "_OnlyWhenStructFileExists"
-     "_Wrapped[(custom_structure_name: str, custom_structure_path: str = ...), T@__call__ | None, (custom_structure_name: str, custom_structure_path: str = ...), T@wrapper | None]" is incompatible with protocol "_OnlyWhenStructFileExists"
+     "_Wrapped[(custom_structure_name: str, custom_structure_path: str = ""), T@__call__ | None, (custom_structure_name: str, custom_structure_path: str = ""), T@wrapper | None]" is incompatible with protocol "_OnlyWhenStructFileExists"
-         Type "(custom_structure_name: str, custom_structure_path: str = ...) -> (T@wrapper | None)" is incompatible with type "(custom_structure_name: str, custom_structure_path: str = "") -> (T@__call__ | None)"
+         Type "(custom_structure_name: str, custom_structure_path: str = "") -> (T@wrapper | None)" is incompatible with type "(custom_structure_name: str, custom_structure_path: str = "") -> (T@__call__ | None)"

prefect (https://github.com/PrefectHQ/prefect)
-     "function" is incompatible with "abstractstaticmethod[(__call: (() -> T@wait_for_call_in_loop_thread) | Call[T@wait_for_call_in_loop_thread], timeout: float | None = ..., done_callbacks: Iterable[Call[Unknown]] | None = ...), T@wait_for_call_in_loop_thread]" (reportIncompatibleVariableOverride)
+     "function" is incompatible with "abstractstaticmethod[(__call: (() -> T@wait_for_call_in_loop_thread) | Call[T@wait_for_call_in_loop_thread], timeout: float | None = None, done_callbacks: Iterable[Call[Unknown]] | None = None), T@wait_for_call_in_loop_thread]" (reportIncompatibleVariableOverride)
-     "function" is incompatible with "abstractstaticmethod[(__call: (() -> T@wait_for_call_in_new_thread) | Call[T@wait_for_call_in_new_thread], timeout: float | None = ..., done_callbacks: Iterable[Call[Unknown]] | None = ...), T@wait_for_call_in_new_thread]" (reportIncompatibleVariableOverride)
+     "function" is incompatible with "abstractstaticmethod[(__call: (() -> T@wait_for_call_in_new_thread) | Call[T@wait_for_call_in_new_thread], timeout: float | None = None, done_callbacks: Iterable[Call[Unknown]] | None = None), T@wait_for_call_in_new_thread]" (reportIncompatibleVariableOverride)
-     "function" is incompatible with "abstractstaticmethod[(__call: (() -> T@wait_for_call_in_loop_thread) | Call[T@wait_for_call_in_loop_thread], timeout: float | None = ..., done_callbacks: Iterable[Call[Unknown]] | None = ...), T@wait_for_call_in_loop_thread]" (reportIncompatibleVariableOverride)
+     "function" is incompatible with "abstractstaticmethod[(__call: (() -> T@wait_for_call_in_loop_thread) | Call[T@wait_for_call_in_loop_thread], timeout: float | None = None, done_callbacks: Iterable[Call[Unknown]] | None = None), T@wait_for_call_in_loop_thread]" (reportIncompatibleVariableOverride)
-     "function" is incompatible with "abstractstaticmethod[(__call: (() -> T@wait_for_call_in_new_thread) | Call[T@wait_for_call_in_new_thread], timeout: float | None = ..., done_callbacks: Iterable[Call[Unknown]] | None = ...), T@wait_for_call_in_new_thread]" (reportIncompatibleVariableOverride)
+     "function" is incompatible with "abstractstaticmethod[(__call: (() -> T@wait_for_call_in_new_thread) | Call[T@wait_for_call_in_new_thread], timeout: float | None = None, done_callbacks: Iterable[Call[Unknown]] | None = None), T@wait_for_call_in_new_thread]" (reportIncompatibleVariableOverride)
-   /tmp/mypy_primer/projects/prefect/src/prefect/input/actions.py:52:2 - error: Argument of type "(key: str, value: Any, flow_run_id: UUID | None = ..., sender: str | None = ...) -> Awaitable[None]" cannot be assigned to parameter "async_fn" of type "(...) -> Coroutine[Any, Any, R@sync_compatible]" in function "sync_compatible"
+   /tmp/mypy_primer/projects/prefect/src/prefect/input/actions.py:52:2 - error: Argument of type "(key: str, value: Any, flow_run_id: UUID | None = None, sender: str | None = None) -> Awaitable[None]" cannot be assigned to parameter "async_fn" of type "(...) -> Coroutine[Any, Any, R@sync_compatible]" in function "sync_compatible"
-     Type "(key: str, value: Any, flow_run_id: UUID | None = ..., sender: str | None = ...) -> Awaitable[None]" is incompatible with type "(...) -> Coroutine[Any, Any, R@sync_compatible]"
+     Type "(key: str, value: Any, flow_run_id: UUID | None = None, sender: str | None = None) -> Awaitable[None]" is incompatible with type "(...) -> Coroutine[Any, Any, R@sync_compatible]"
-   /tmp/mypy_primer/projects/prefect/src/prefect/input/actions.py:81:2 - error: Argument of type "(key_prefix: str, limit: int = ..., exclude_keys: Set[str] | None = ..., flow_run_id: UUID | None = ...) -> Awaitable[List[FlowRunInput]]" cannot be assigned to parameter "async_fn" of type "(...) -> Coroutine[Any, Any, R@sync_compatible]" in function "sync_compatible"
+   /tmp/mypy_primer/projects/prefect/src/prefect/input/actions.py:81:2 - error: Argument of type "(key_prefix: str, limit: int = 1, exclude_keys: Set[str] | None = None, flow_run_id: UUID | None = None) -> Awaitable[List[FlowRunInput]]" cannot be assigned to parameter "async_fn" of type "(...) -> Coroutine[Any, Any, R@sync_compatible]" in function "sync_compatible"
-     Type "(key_prefix: str, limit: int = ..., exclude_keys: Set[str] | None = ..., flow_run_id: UUID | None = ...) -> Awaitable[List[FlowRunInput]]" is incompatible with type "(...) -> Coroutine[Any, Any, R@sync_compatible]"
+     Type "(key_prefix: str, limit: int = 1, exclude_keys: Set[str] | None = None, flow_run_id: UUID | None = None) -> Awaitable[List[FlowRunInput]]" is incompatible with type "(...) -> Coroutine[Any, Any, R@sync_compatible]"
-   /tmp/mypy_primer/projects/prefect/src/prefect/input/actions.py:103:2 - error: Argument of type "(key: str, flow_run_id: UUID | None = ...) -> Awaitable[Any]" cannot be assigned to parameter "async_fn" of type "(...) -> Coroutine[Any, Any, R@sync_compatible]" in function "sync_compatible"
+   /tmp/mypy_primer/projects/prefect/src/prefect/input/actions.py:103:2 - error: Argument of type "(key: str, flow_run_id: UUID | None = None) -> Awaitable[Any]" cannot be assigned to parameter "async_fn" of type "(...) -> Coroutine[Any, Any, R@sync_compatible]" in function "sync_compatible"
-     Type "(key: str, flow_run_id: UUID | None = ...) -> Awaitable[Any]" is incompatible with type "(...) -> Coroutine[Any, Any, R@sync_compatible]"
+     Type "(key: str, flow_run_id: UUID | None = None) -> Awaitable[Any]" is incompatible with type "(...) -> Coroutine[Any, Any, R@sync_compatible]"
-   /tmp/mypy_primer/projects/prefect/src/prefect/input/actions.py:126:2 - error: Argument of type "(key: str, flow_run_id: UUID | None = ...) -> Awaitable[None]" cannot be assigned to parameter "async_fn" of type "(...) -> Coroutine[Any, Any, R@sync_compatible]" in function "sync_compatible"
+   /tmp/mypy_primer/projects/prefect/src/prefect/input/actions.py:126:2 - error: Argument of type "(key: str, flow_run_id: UUID | None = None) -> Awaitable[None]" cannot be assigned to parameter "async_fn" of type "(...) -> Coroutine[Any, Any, R@sync_compatible]" in function "sync_compatible"
-     Type "(key: str, flow_run_id: UUID | None = ...) -> Awaitable[None]" is incompatible with type "(...) -> Coroutine[Any, Any, R@sync_compatible]"
+     Type "(key: str, flow_run_id: UUID | None = None) -> Awaitable[None]" is incompatible with type "(...) -> Coroutine[Any, Any, R@sync_compatible]"

@erictraut erictraut merged commit 0b2dc24 into main Aug 19, 2024
18 checks passed
@erictraut erictraut deleted the issue-8781 branch August 20, 2024 18:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant