Skip to content

Commit 95c3c3a

Browse files
committed
fix circular import
1 parent a8c32cc commit 95c3c3a

File tree

6 files changed

+31
-6
lines changed

6 files changed

+31
-6
lines changed

cmake_file_api/kinds/cache/api.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
1+
from __future__ import annotations
2+
import typing
3+
14
from .v2 import CacheV2
2-
from ..api import CMakeApiType
5+
6+
if typing.TYPE_CHECKING:
7+
from ..api import CMakeApiType
38

49
CACHE_API: dict[int, CMakeApiType] = {
510
2: CacheV2,

cmake_file_api/kinds/cmakeFiles/api.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
1+
from __future__ import annotations
2+
import typing
3+
14
from .v1 import CMakeFilesV1
2-
from ..api import CMakeApiType
5+
6+
if typing.TYPE_CHECKING:
7+
from ..api import CMakeApiType
38

49
CMAKEFILES_API: dict[int, CMakeApiType] = {
510
1: CMakeFilesV1,

cmake_file_api/kinds/codemodel/api.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
1+
from __future__ import annotations
2+
import typing
3+
14
from .v2 import CodemodelV2
2-
from ..api import CMakeApiType
5+
6+
7+
if typing.TYPE_CHECKING:
8+
from ..api import CMakeApiType
39

410
CODEMODEL_API: dict[int, CMakeApiType] = {
511
2: CodemodelV2,

cmake_file_api/kinds/configureLog/api.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
1+
from __future__ import annotations
2+
import typing
3+
14
from .v1 import ConfigureLogV1
2-
from ..api import CMakeApiType
5+
6+
if typing.TYPE_CHECKING:
7+
from ..api import CMakeApiType
38

49
CONFIGURELOG_API: dict[int, CMakeApiType] = {
510
1: ConfigureLogV1,

cmake_file_api/kinds/toolchains/api.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
1+
from __future__ import annotations
2+
import typing
3+
14
from .v1 import ToolchainsV1
2-
from ..api import CMakeApiType
5+
6+
if typing.TYPE_CHECKING:
7+
from ..api import CMakeApiType
38

49
TOOLCHAINS_API: dict[int, CMakeApiType] = {
510
1: ToolchainsV1,

cmake_file_api/reply/v1/api.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33

44
from cmake_file_api.errors import CMakeException
55
from cmake_file_api.kinds.api import CMakeApiType, OBJECT_KINDS_API
6-
from cmake_file_api.kinds.cmakeFiles.v1 import CMakeFilesV1
76
from cmake_file_api.reply.index.api import INDEX_API
87
from cmake_file_api.kinds.kind import ObjectKind
98
from cmake_file_api.reply.index.v1 import CMakeReplyFileV1

0 commit comments

Comments
 (0)