Skip to content

Commit 165bbb9

Browse files
circular import to be fixed
1 parent b7344a4 commit 165bbb9

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

PySpice/Spice/Netlist.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,13 +89,15 @@ def __init__(self, **kwargs):
8989
####################################################################################################
9090

9191
from PySpice.Tools.TextBuffer import TextBuffer
92+
# Fixme: circular import
9293
# from . import Library
9394
from .DeviceModel import DeviceModel
9495
from .Element import Pin, Element
9596
from .StringTools import join_list, prefix_lines
9697

9798
if TYPE_CHECKING:
9899
from .Simulator import Simulator
100+
from . import Library
99101

100102
####################################################################################################
101103

@@ -622,11 +624,10 @@ def includes(self) -> Iterator[Path]:
622624

623625
##############################################
624626

625-
# Fixme: circular import...
626-
# , Library.SubCircuit
627-
def include(self, path: Union[Path, str], warn: bool = True) -> None:
627+
def include(self, path: Union[Path, str, 'Library.SubCircuit'], warn: bool = True) -> None:
628628
"""Include a file."""
629629
# Fixme: str(path) ?
630+
# Fixme: circular import...
630631
from . import Library
631632
if isinstance(path, Library.Subcircuit):
632633
path = path.path

0 commit comments

Comments
 (0)