Skip to content

Commit a087b05

Browse files
Potential fix for code scanning alert no. 9939: Cyclic import
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> Signed-off-by: Jinzhe Zeng <njzjz@qq.com>
1 parent d6ca0ee commit a087b05

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

deepmd/dpmodel/common.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
Callable,
1212
Optional,
1313
overload,
14+
TYPE_CHECKING,
1415
)
1516

1617
import array_api_compat
@@ -20,9 +21,8 @@
2021
from deepmd.common import (
2122
VALID_PRECISION,
2223
)
23-
from deepmd.dpmodel.array_api import (
24-
Array,
25-
)
24+
if TYPE_CHECKING:
25+
from deepmd.dpmodel.array_api import Array
2626
from deepmd.env import (
2727
GLOBAL_ENER_FLOAT_PRECISION,
2828
GLOBAL_NP_FLOAT_PRECISION,

0 commit comments

Comments
 (0)