Skip to content

Commit 0080c43

Browse files
author
Jens Kürten
committed
fix cyclic dependency
1 parent a5a62bf commit 0080c43

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

csfunctions/objects/document.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
from contextlib import suppress
21
from datetime import date, datetime
32
from typing import TYPE_CHECKING, Literal, Optional
43

@@ -8,9 +7,7 @@
87

98
from .base import BaseObject, ObjectType
109
from .file import File
11-
12-
with suppress(ImportError):
13-
from .part import Part
10+
from .part import Part
1411

1512
if TYPE_CHECKING:
1613
from csfunctions.events import EventData
@@ -99,3 +96,6 @@ class CADDocument(Document):
9996
"""
10097

10198
object_type: Literal[ObjectType.CAD_DOCUMENT] = ObjectType.CAD_DOCUMENT # type: ignore[assignment]
99+
100+
101+
Part.model_rebuild()

csfunctions/objects/part.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
from contextlib import suppress
21
from datetime import date, datetime
32
from typing import TYPE_CHECKING, Literal, Optional
43

@@ -11,7 +10,6 @@
1110
if TYPE_CHECKING:
1211
from csfunctions.events import EventData
1312

14-
with suppress(ImportError):
1513
from .document import Document
1614

1715

0 commit comments

Comments
 (0)