From a5ae8c6ff84245c929dbf65bcc215bef8ea14a3f Mon Sep 17 00:00:00 2001 From: "Andrew S. Rosen" Date: Thu, 19 Sep 2024 17:23:22 -0400 Subject: [PATCH 1/2] Update type hints --- src/quacc/wflow_tools/decorators.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/quacc/wflow_tools/decorators.py b/src/quacc/wflow_tools/decorators.py index 864d73d8a9..0946461542 100644 --- a/src/quacc/wflow_tools/decorators.py +++ b/src/quacc/wflow_tools/decorators.py @@ -4,10 +4,13 @@ from collections.abc import Callable from functools import partial, wraps -from typing import Any +from typing import Any, TYPE_CHECKING from quacc.settings import change_settings_wrap +if TYPE_CHECKING: + from quacc.settings import QuaccSettings + Job = Callable[..., Any] Flow = Callable[..., Any] Subflow = Callable[..., Any] @@ -627,7 +630,7 @@ def wrapper( return wrapper -def _get_prefect_wrapped_flow(_func, settings, **kwargs): +def _get_prefect_wrapped_flow(_func: Callable, settings: QuaccSettings, **kwargs) -> Callable: from prefect import flow as prefect_flow from prefect.utilities.asyncutils import is_async_fn From 5415be7100e22025aeb7dbfcc73ae1e78941e589 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Thu, 19 Sep 2024 21:24:19 +0000 Subject: [PATCH 2/2] pre-commit auto-fixes --- src/quacc/wflow_tools/decorators.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/quacc/wflow_tools/decorators.py b/src/quacc/wflow_tools/decorators.py index 0946461542..604dc0e0db 100644 --- a/src/quacc/wflow_tools/decorators.py +++ b/src/quacc/wflow_tools/decorators.py @@ -4,7 +4,7 @@ from collections.abc import Callable from functools import partial, wraps -from typing import Any, TYPE_CHECKING +from typing import TYPE_CHECKING, Any from quacc.settings import change_settings_wrap @@ -630,7 +630,9 @@ def wrapper( return wrapper -def _get_prefect_wrapped_flow(_func: Callable, settings: QuaccSettings, **kwargs) -> Callable: +def _get_prefect_wrapped_flow( + _func: Callable, settings: QuaccSettings, **kwargs +) -> Callable: from prefect import flow as prefect_flow from prefect.utilities.asyncutils import is_async_fn