Skip to content

Commit da506c8

Browse files
committed
Fixes circular dependencies
Signed-off-by: Christopher Grote <cmgrote@users.noreply.github.com>
1 parent 70bff1a commit da506c8

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

pyatlan/client/atlan.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,6 @@
7777
TypeDefResponse,
7878
)
7979
from pyatlan.utils import HTTPStatus, get_logger
80-
from pyatlan.cache import CustomMetadataCache, ClassificationCache
8180

8281
LOGGER = get_logger()
8382
T = TypeVar("T", bound=Referenceable)
@@ -484,15 +483,19 @@ def create_typedef(self, typedef: TypeDef) -> TypeDefResponse:
484483
CREATE_TYPE_DEFS, request_obj=payload, exclude_unset=False
485484
)
486485
if isinstance(typedef, ClassificationDef):
486+
from pyatlan.cache.classification_cache import ClassificationCache
487487
ClassificationCache.refresh_cache()
488488
if isinstance(typedef, CustomMetadataDef):
489+
from pyatlan.cache.custom_metadata_cache import CustomMetadataCache
489490
CustomMetadataCache.refresh_cache()
490491
return TypeDefResponse(**raw_json)
491492

492493
def purge_typedef(self, internal_name: str) -> None:
493494
self._call_api(DELETE_TYPE_DEF_BY_NAME.format_path_with_params(internal_name))
494495
# TODO: if we know which kind of typedef is being purged, we only need
495496
# to refresh that particular cache
497+
from pyatlan.cache.classification_cache import ClassificationCache
498+
from pyatlan.cache.custom_metadata_cache import CustomMetadataCache
496499
ClassificationCache.refresh_cache()
497500
CustomMetadataCache.refresh_cache()
498501

0 commit comments

Comments
 (0)