From e0c4d43d09f63d7c6979f238e07939aededfdcff Mon Sep 17 00:00:00 2001 From: z3z1ma Date: Sat, 27 Jul 2024 01:39:14 -0700 Subject: [PATCH] style: format code --- src/cdf/integrations/feature_flag/__init__.py | 3 +-- src/cdf/integrations/sqlmesh.py | 8 +++++--- src/cdf/legacy/project.py | 6 ++++-- src/cdf/legacy/runtime/__init__.py | 3 +-- src/cdf/legacy/runtime/pipeline.py | 8 ++++++-- src/cdf/legacy/specification/notebook.py | 3 +-- src/cdf/legacy/specification/pipeline.py | 6 ++---- src/cdf/legacy/state.py | 12 ++++++------ 8 files changed, 26 insertions(+), 23 deletions(-) diff --git a/src/cdf/integrations/feature_flag/__init__.py b/src/cdf/integrations/feature_flag/__init__.py index 0617f16..0762087 100644 --- a/src/cdf/integrations/feature_flag/__init__.py +++ b/src/cdf/integrations/feature_flag/__init__.py @@ -13,8 +13,7 @@ from cdf.integrations.feature_flag.base import AbstractFeatureFlagAdapter from cdf.integrations.feature_flag.file import FilesystemFeatureFlagAdapter from cdf.integrations.feature_flag.harness import HarnessFeatureFlagAdapter -from cdf.integrations.feature_flag.launchdarkly import \ - LaunchDarklyFeatureFlagAdapter +from cdf.integrations.feature_flag.launchdarkly import LaunchDarklyFeatureFlagAdapter from cdf.integrations.feature_flag.noop import NoopFeatureFlagAdapter from cdf.integrations.feature_flag.split import SplitFeatureFlagAdapter from cdf.types import M diff --git a/src/cdf/integrations/sqlmesh.py b/src/cdf/integrations/sqlmesh.py index 06756d7..b5553eb 100644 --- a/src/cdf/integrations/sqlmesh.py +++ b/src/cdf/integrations/sqlmesh.py @@ -2,9 +2,11 @@ import time import typing as t -from sqlmesh.core.notification_target import (ConsoleNotificationTarget, - NotificationEvent, - NotificationStatus) +from sqlmesh.core.notification_target import ( + ConsoleNotificationTarget, + NotificationEvent, + NotificationStatus, +) from sqlmesh.utils.errors import AuditError from cdf.legacy.project import Workspace diff --git a/src/cdf/legacy/project.py b/src/cdf/legacy/project.py index 260dd74..3abcd88 100644 --- a/src/cdf/legacy/project.py +++ b/src/cdf/legacy/project.py @@ -57,8 +57,10 @@ import cdf.legacy.constants as c import cdf.legacy.specification as spec -from cdf.integrations.feature_flag import (AbstractFeatureFlagAdapter, - get_feature_flag_adapter_cls) +from cdf.integrations.feature_flag import ( + AbstractFeatureFlagAdapter, + get_feature_flag_adapter_cls, +) from cdf.legacy.config import inject_configuration from cdf.legacy.filesystem import FilesystemAdapter from cdf.legacy.state import StateStore diff --git a/src/cdf/legacy/runtime/__init__.py b/src/cdf/legacy/runtime/__init__.py index 725829a..39be86f 100644 --- a/src/cdf/legacy/runtime/__init__.py +++ b/src/cdf/legacy/runtime/__init__.py @@ -1,6 +1,5 @@ from cdf.legacy.runtime.notebook import execute_notebook_specification -from cdf.legacy.runtime.pipeline import (execute_pipeline_specification, - pipeline) +from cdf.legacy.runtime.pipeline import execute_pipeline_specification, pipeline from cdf.legacy.runtime.publisher import execute_publisher_specification from cdf.legacy.runtime.script import execute_script_specification diff --git a/src/cdf/legacy/runtime/pipeline.py b/src/cdf/legacy/runtime/pipeline.py index 84a8e15..c40b39f 100644 --- a/src/cdf/legacy/runtime/pipeline.py +++ b/src/cdf/legacy/runtime/pipeline.py @@ -23,8 +23,12 @@ import dlt from dlt.common.destination import TDestinationReferenceArg, TLoaderFileFormat from dlt.common.pipeline import ExtractInfo, LoadInfo, NormalizeInfo -from dlt.common.schema.typing import (TAnySchemaColumns, TColumnNames, - TSchemaContract, TWriteDisposition) +from dlt.common.schema.typing import ( + TAnySchemaColumns, + TColumnNames, + TSchemaContract, + TWriteDisposition, +) from dlt.extract.extract import Extract, data_to_sources from dlt.pipeline.exceptions import SqlClientNotAvailable from dlt.pipeline.pipeline import Pipeline diff --git a/src/cdf/legacy/specification/notebook.py b/src/cdf/legacy/specification/notebook.py index c5ae865..2d738d9 100644 --- a/src/cdf/legacy/specification/notebook.py +++ b/src/cdf/legacy/specification/notebook.py @@ -3,8 +3,7 @@ import pydantic -from cdf.legacy.specification.base import (InstallableRequirements, - WorkspaceComponent) +from cdf.legacy.specification.base import InstallableRequirements, WorkspaceComponent class NotebookSpecification(WorkspaceComponent, InstallableRequirements): diff --git a/src/cdf/legacy/specification/pipeline.py b/src/cdf/legacy/specification/pipeline.py index d71257a..5393d99 100644 --- a/src/cdf/legacy/specification/pipeline.py +++ b/src/cdf/legacy/specification/pipeline.py @@ -8,13 +8,11 @@ import dlt import pydantic -from dlt.common.destination.exceptions import \ - DestinationLoadingViaStagingNotSupported +from dlt.common.destination.exceptions import DestinationLoadingViaStagingNotSupported from dlt.common.typing import TDataItem import cdf.legacy.logger as logger -from cdf.legacy.specification.base import (PythonEntrypoint, PythonScript, - Schedulable) +from cdf.legacy.specification.base import PythonEntrypoint, PythonScript, Schedulable T = t.TypeVar("T") TPipeline = t.TypeVar("TPipeline", bound=dlt.Pipeline) diff --git a/src/cdf/legacy/state.py b/src/cdf/legacy/state.py index 7e34683..b54b818 100644 --- a/src/cdf/legacy/state.py +++ b/src/cdf/legacy/state.py @@ -9,9 +9,11 @@ import pydantic from dlt.common.pipeline import ExtractInfo, LoadInfo, NormalizeInfo from sqlglot import exp -from sqlmesh.core.config.connection import (DuckDBConnectionConfig, - MySQLConnectionConfig, - PostgresConnectionConfig) +from sqlmesh.core.config.connection import ( + DuckDBConnectionConfig, + MySQLConnectionConfig, + PostgresConnectionConfig, +) from sqlmesh.core.engine_adapter import EngineAdapter import cdf.legacy.logger as logger @@ -388,9 +390,7 @@ def wrapper(*args: P.args, **kwargs: P.kwargs) -> T: event, input_props, output_props, - )( - func - )(*args, **kwargs) + )(func)(*args, **kwargs) return wrapper