This commit is contained in:
jan 2023-04-07 23:49:20 -07:00
parent 8b3f76c2e3
commit de04d06b7a
6 changed files with 3 additions and 6 deletions

View File

@ -1,8 +1,7 @@
from typing import Self, Sequence, MutableMapping, Mapping from typing import Self, Sequence, Mapping
import copy import copy
import logging import logging
import numpy
from numpy import pi from numpy import pi
from numpy.typing import ArrayLike from numpy.typing import ArrayLike

View File

@ -7,7 +7,6 @@ from numpy import pi
from numpy.typing import ArrayLike from numpy.typing import ArrayLike
from ..pattern import Pattern from ..pattern import Pattern
from ..ref import Ref
from ..library import ILibrary from ..library import ILibrary
from ..error import PortError, BuildError from ..error import PortError, BuildError
from ..ports import PortList, Port from ..ports import PortList, Port

View File

@ -73,7 +73,7 @@ def write(
stream: Stream object to write to. stream: Stream object to write to.
""" """
#TODO consider supporting DXF arcs? #TODO consider supporting DXF arcs?
if not isinstance(library, Library): if not isinstance(library, ILibraryView):
if isinstance(library, dict): if isinstance(library, dict):
library = LibraryView(library) library = LibraryView(library)
else: else:

View File

@ -496,7 +496,6 @@ class ILibrary(ILibraryView, MutableMapping[str, 'Pattern'], metaclass=ABCMeta):
self.rename(self.top(), name, move_references=True) self.rename(self.top(), name, move_references=True)
return self return self
def move_references(self, old_target: str, new_target: str) -> Self: def move_references(self, old_target: str, new_target: str) -> Self:
""" """
Change all references pointing at `old_target` into references pointing at `new_target`. Change all references pointing at `old_target` into references pointing at `new_target`.

View File

@ -585,7 +585,6 @@ class Pattern(PortList, AnnotatableImpl, Mirrorable):
self.labels.append(Label(*args, **kwargs)) self.labels.append(Label(*args, **kwargs))
return self return self
def flatten( def flatten(
self, self,
library: Mapping[str, 'Pattern'], library: Mapping[str, 'Pattern'],

View File

@ -12,6 +12,7 @@ class Layerable(metaclass=ABCMeta):
Trait class for all layerable entities Trait class for all layerable entities
""" """
__slots__ = () __slots__ = ()
# #
# Properties # Properties
# #