From 763789af6b7903e155c3b167bceb8f57123d3fa8 Mon Sep 17 00:00:00 2001 From: Ethan Cartwright Date: Thu, 28 Dec 2023 14:07:48 -0500 Subject: [PATCH] generalize typing to avoid circular dependency --- .../src/datahub/ingestion/api/source_helpers.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/metadata-ingestion/src/datahub/ingestion/api/source_helpers.py b/metadata-ingestion/src/datahub/ingestion/api/source_helpers.py index 33b538a867fd0a..c0877e57966f47 100644 --- a/metadata-ingestion/src/datahub/ingestion/api/source_helpers.py +++ b/metadata-ingestion/src/datahub/ingestion/api/source_helpers.py @@ -2,6 +2,7 @@ from datetime import datetime, timezone from typing import ( TYPE_CHECKING, + Any, Callable, Dict, Iterable, @@ -19,7 +20,6 @@ from datahub.emitter.mcp import MetadataChangeProposalWrapper from datahub.emitter.mcp_builder import entity_supports_aspect from datahub.ingestion.api.workunit import MetadataWorkUnit -from datahub.ingestion.source.sql.sql_generic import BaseTable from datahub.metadata.com.linkedin.pegasus2avro.common import TimeStamp from datahub.metadata.schema_classes import ( BrowsePathEntryClass, @@ -65,7 +65,7 @@ def auto_workunit( def create_dataset_props_patch_builder( datahub_dataset_name: str, dataset_urn: str, - table: BaseTable, + table: Any, # TODO: refactor to avoid circular import while type-hinting with BaseTable custom_properties: Optional[Dict[str, str]] = None, ) -> DatasetPatchBuilder: """Creates a patch builder with a table's or view's attributes and dataset properties"""