master
jan 1 year ago
parent 1008b6aabd
commit de0d35d3d7

@ -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

@ -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

@ -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:

@ -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`.

@ -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'],

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

Loading…
Cancel
Save