From d4dbd4f9cfb10c1b9d8de2ffcae1541a3b2f076e Mon Sep 17 00:00:00 2001 From: Jeremiah Lowin <153965+jlowin@users.noreply.github.com> Date: Mon, 17 Jun 2024 18:39:53 -0400 Subject: [PATCH] Fix merge conflicts --- compat-tests | 2 +- .../prefect-dask/tests/conftest.py | 6 ----- src/prefect/flows.py | 15 ++++++++---- src/prefect/tasks.py | 24 ++++++++++++------- 4 files changed, 27 insertions(+), 20 deletions(-) diff --git a/compat-tests b/compat-tests index 3c5ec0111e2a..8272664027a1 160000 --- a/compat-tests +++ b/compat-tests @@ -1 +1 @@ -Subproject commit 3c5ec0111e2aa7b160f2b21cfd383d19448dfe13 +Subproject commit 8272664027a1e4d4267d556758ec0a032bdf4d3e diff --git a/src/integrations/prefect-dask/tests/conftest.py b/src/integrations/prefect-dask/tests/conftest.py index 41803ca697ec..9453d9deafc5 100644 --- a/src/integrations/prefect-dask/tests/conftest.py +++ b/src/integrations/prefect-dask/tests/conftest.py @@ -52,9 +52,3 @@ def event_loop(request): # Workaround for failures in pytest_asyncio 0.17; # see https://github.com/pytest-dev/pytest-asyncio/issues/257 policy.set_event_loop(loop) - - -@pytest.fixture(autouse=True) -def fetch_state_result(): - with temporary_settings(updates={PREFECT_ASYNC_FETCH_STATE_RESULT: True}): - yield diff --git a/src/prefect/flows.py b/src/prefect/flows.py index 0a5c1f63bdbb..9e90cde0ab2a 100644 --- a/src/prefect/flows.py +++ b/src/prefect/flows.py @@ -1184,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__( @@ -1199,7 +1201,8 @@ def __call__( *args: P.args, return_state: Literal[True], **kwargs: P.kwargs, - ) -> State[T]: ... + ) -> State[T]: + ... def __call__( self, @@ -1337,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 @@ -1368,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/src/prefect/tasks.py b/src/prefect/tasks.py index 4d8f81103bab..8d60f9623130 100644 --- a/src/prefect/tasks.py +++ b/src/prefect/tasks.py @@ -764,7 +764,8 @@ def __call__( self: "Task[P, T]", *args: P.args, **kwargs: P.kwargs, - ) -> T: ... + ) -> T: + ... @overload def __call__( @@ -772,7 +773,8 @@ def __call__( *args: P.args, return_state: Literal[True], **kwargs: P.kwargs, - ) -> State[T]: ... + ) -> State[T]: + ... def __call__( self, @@ -825,7 +827,8 @@ def submit( self: "Task[P, T]", *args: P.args, **kwargs: P.kwargs, - ) -> PrefectFuture: ... + ) -> PrefectFuture: + ... @overload def submit( @@ -834,7 +837,8 @@ def submit( wait_for: Optional[Iterable[PrefectFuture]] = None, *args: P.args, **kwargs: P.kwargs, - ) -> State[T]: ... + ) -> State[T]: + ... def submit( self, @@ -973,7 +977,8 @@ def map( self: "Task[P, T]", *args: P.args, **kwargs: P.kwargs, - ) -> List[PrefectFuture]: ... + ) -> List[PrefectFuture]: + ... @overload def map( @@ -981,7 +986,8 @@ def map( return_state: Literal[True], *args: P.args, **kwargs: P.kwargs, - ) -> List[State[T]]: ... + ) -> List[State[T]]: + ... def map( self, @@ -1297,7 +1303,8 @@ def serve(self) -> "Task": @overload -def task(__fn: Callable[P, R]) -> Task[P, R]: ... +def task(__fn: Callable[P, R]) -> Task[P, R]: + ... @overload @@ -1333,7 +1340,8 @@ def task( on_failure: Optional[List[Callable[["Task", TaskRun, State], None]]] = None, retry_condition_fn: Optional[Callable[["Task", TaskRun, State], bool]] = None, viz_return_value: Any = None, -) -> Callable[[Callable[P, R]], Task[P, R]]: ... +) -> Callable[[Callable[P, R]], Task[P, R]]: + ... def task(