Skip to content

Commit e003fc7

Browse files
committed
[change] Switched to importlib instead to ensure the module is loaded before validating
1 parent 97e8d13 commit e003fc7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pyatlan/model/typedef.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from __future__ import annotations
22

3+
import importlib
34
import json
4-
import sys
55
import time
66
from typing import Any, Callable, ClassVar, Dict, List, Optional, Set, Union, cast
77

@@ -677,7 +677,7 @@ def applicable_asset_types(self, asset_types: Union[Set[str], AssetTypes]):
677677
asset_type
678678
for asset_type in asset_types
679679
if not getattr(
680-
sys.modules.get("pyatlan.model.assets", {}), asset_type, None
680+
importlib.import_module("pyatlan.model.assets"), asset_type, None
681681
)
682682
}
683683
if invalid_types:

0 commit comments

Comments
 (0)