fix(sdk): Move resolver client import into resolve method (#13780)

This commit is contained in:
Anthony Burdi 2025-06-16 10:26:47 -04:00 committed by GitHub
parent 2651bb1e76
commit eb9de90ecc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -9,15 +9,6 @@ from datahub.sdk.entity_client import EntityClient
from datahub.sdk.lineage_client import LineageClient
from datahub.sdk.search_client import SearchClient
try:
from acryl_datahub_cloud.sdk import ( # type: ignore[import-not-found]
ResolverClient,
)
except ImportError:
from datahub.sdk.resolver_client import ( # type: ignore[assignment] # If the client is not installed, use the one from the SDK
ResolverClient,
)
class DataHubClient:
"""Main client for interacting with DataHub.
@ -101,7 +92,15 @@ class DataHubClient:
return EntityClient(self)
@property
def resolve(self) -> ResolverClient:
def resolve(self): # type: ignore[report-untyped-call] # Not available due to circular import issues
try:
from acryl_datahub_cloud.sdk import ( # type: ignore[import-not-found]
ResolverClient,
)
except ImportError:
from datahub.sdk.resolver_client import ( # type: ignore[assignment] # If the client is not installed, use the one from the SDK
ResolverClient,
)
return ResolverClient(self)
@property