Skip to content

Commit

Permalink
Lint
Browse files Browse the repository at this point in the history
  • Loading branch information
jlowin committed Jun 19, 2024
1 parent 6f39ec7 commit fc23fc7
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
16 changes: 10 additions & 6 deletions src/prefect/flows.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -1185,22 +1184,25 @@ 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__(
self: "Flow[P, T]",
*args: P.args,
return_state: Literal[True],
**kwargs: P.kwargs,
) -> State[T]: ...
) -> State[T]:
...

def __call__(
self,
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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(
Expand Down
1 change: 0 additions & 1 deletion tests/test_flows.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit fc23fc7

Please sign in to comment.