mirror of
https://github.com/datahub-project/datahub.git
synced 2025-07-16 21:58:39 +00:00
fix(sdk): Move resolver client import into resolve method (#13780)
This commit is contained in:
parent
2651bb1e76
commit
eb9de90ecc
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user