This commit is contained in:
jan 2023-04-07 23:49:20 -07:00
parent 1008b6aabd
commit de0d35d3d7
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 logging
import numpy
from numpy import pi
from numpy.typing import ArrayLike

View File

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

View File

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

View File

@ -496,7 +496,6 @@ class ILibrary(ILibraryView, MutableMapping[str, 'Pattern'], metaclass=ABCMeta):
self.rename(self.top(), name, move_references=True)
return 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`.

View File

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

View File

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