Skip to content

Commit a97ed4c

Browse files
committed
[fix] Fixed fluent_search.py AtlanClient circular import issue
1 parent cfd0653 commit a97ed4c

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

pyatlan/model/fluent_search.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import copy
44
import dataclasses
55
import logging
6-
from typing import Dict, List, Optional, TypeVar, Union
6+
from typing import TYPE_CHECKING, Dict, List, Optional, TypeVar, Union
77

88
from pyatlan.cache.atlan_tag_cache import AtlanTagCache
99
from pyatlan.client.asset import IndexSearchResults
@@ -24,6 +24,9 @@
2424
Term,
2525
)
2626

27+
if TYPE_CHECKING:
28+
from pyatlan.client.atlan import AtlanClient
29+
2730
LOGGER = logging.getLogger(__name__)
2831

2932
SelfQuery = TypeVar("SelfQuery", bound="CompoundQuery")
@@ -160,6 +163,8 @@ def tagged_with_value(
160163
:returns: a query that will only match assets that have
161164
a particular value assigned for the given Atlan tag
162165
"""
166+
from pyatlan.client.atlan import AtlanClient
167+
163168
big_spans = []
164169
little_spans = []
165170
tag_id = AtlanTagCache.get_id_for_name(atlan_tag_name) or ""
@@ -523,6 +528,3 @@ def execute(self, client: AtlanClient, bulk: bool = False) -> IndexSearchResults
523528
:returns: an iterable list of assets that match the supplied criteria, lazily-fetched
524529
"""
525530
return client.asset.search(criteria=self.to_request(), bulk=bulk)
526-
527-
528-
from pyatlan.client.atlan import AtlanClient # noqa: E402

0 commit comments

Comments
 (0)