diff --git a/src/prefect/flows.py b/src/prefect/flows.py index 60acc2f5b38c..9e90cde0ab2a 100644 --- a/src/prefect/flows.py +++ b/src/prefect/flows.py @@ -83,7 +83,6 @@ from prefect.states import State from prefect.task_runners import TaskRunner, ThreadPoolTaskRunner from prefect.types import BANNED_CHARACTERS, WITHOUT_BANNED_CHARACTERS -from prefect.types.entrypoint import EntrypointType from prefect.utilities.annotations import NotSet from prefect.utilities.asyncutils import ( run_sync_in_worker_thread, @@ -1185,14 +1184,16 @@ def __call__(self: "Flow[P, NoReturn]", *args: P.args, **kwargs: P.kwargs) -> No @overload def __call__( self: "Flow[P, Coroutine[Any, Any, T]]", *args: P.args, **kwargs: P.kwargs - ) -> Awaitable[T]: ... + ) -> Awaitable[T]: + ... @overload def __call__( self: "Flow[P, T]", *args: P.args, **kwargs: P.kwargs, - ) -> T: ... + ) -> T: + ... @overload def __call__( @@ -1200,7 +1201,8 @@ def __call__( *args: P.args, return_state: Literal[True], **kwargs: P.kwargs, - ) -> State[T]: ... + ) -> State[T]: + ... def __call__( self, @@ -1338,7 +1340,8 @@ async def visualize(self, *args, **kwargs): @overload -def flow(__fn: Callable[P, R]) -> Flow[P, R]: ... +def flow(__fn: Callable[P, R]) -> Flow[P, R]: + ... @overload @@ -1369,7 +1372,8 @@ def flow( ] = None, on_crashed: Optional[List[Callable[[FlowSchema, FlowRun, State], None]]] = None, on_running: Optional[List[Callable[[FlowSchema, FlowRun, State], None]]] = None, -) -> Callable[[Callable[P, R]], Flow[P, R]]: ... +) -> Callable[[Callable[P, R]], Flow[P, R]]: + ... def flow( diff --git a/tests/test_flows.py b/tests/test_flows.py index dadf24f5ae1a..d7f2aef9a7bb 100644 --- a/tests/test_flows.py +++ b/tests/test_flows.py @@ -70,7 +70,6 @@ get_most_recent_flow_run, ) from prefect.transactions import transaction -from prefect.types.entrypoint import EntrypointType from prefect.utilities.annotations import allow_failure, quote from prefect.utilities.callables import parameter_schema from prefect.utilities.collections import flatdict_to_dict