cleanup
This commit is contained in:
parent
1008b6aabd
commit
de0d35d3d7
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
@ -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:
|
||||
|
@ -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`.
|
||||
|
@ -585,7 +585,6 @@ class Pattern(PortList, AnnotatableImpl, Mirrorable):
|
||||
self.labels.append(Label(*args, **kwargs))
|
||||
return self
|
||||
|
||||
|
||||
def flatten(
|
||||
self,
|
||||
library: Mapping[str, 'Pattern'],
|
||||
|
@ -12,6 +12,7 @@ class Layerable(metaclass=ABCMeta):
|
||||
Trait class for all layerable entities
|
||||
"""
|
||||
__slots__ = ()
|
||||
|
||||
#
|
||||
# Properties
|
||||
#
|
||||
|
Loading…
Reference in New Issue
Block a user