Compare commits
No commits in common. "24c77fd3c3f1c55d33d75a0a5aadcb308718e2eb" and "1f6d78386c870a4cc74fcbbe159ddcb27531e4ad" have entirely different histories.
24c77fd3c3
...
1f6d78386c
@ -192,27 +192,22 @@ class Builder(PortList):
|
|||||||
@wraps(Pattern.label)
|
@wraps(Pattern.label)
|
||||||
def label(self, *args, **kwargs) -> Self:
|
def label(self, *args, **kwargs) -> Self:
|
||||||
self.pattern.label(*args, **kwargs)
|
self.pattern.label(*args, **kwargs)
|
||||||
return self
|
|
||||||
|
|
||||||
@wraps(Pattern.ref)
|
@wraps(Pattern.ref)
|
||||||
def ref(self, *args, **kwargs) -> Self:
|
def ref(self, *args, **kwargs) -> Self:
|
||||||
self.pattern.ref(*args, **kwargs)
|
self.pattern.ref(*args, **kwargs)
|
||||||
return self
|
|
||||||
|
|
||||||
@wraps(Pattern.polygon)
|
@wraps(Pattern.polygon)
|
||||||
def polygon(self, *args, **kwargs) -> Self:
|
def polygon(self, *args, **kwargs) -> Self:
|
||||||
self.pattern.polygon(*args, **kwargs)
|
self.pattern.polygon(*args, **kwargs)
|
||||||
return self
|
|
||||||
|
|
||||||
@wraps(Pattern.rect)
|
@wraps(Pattern.rect)
|
||||||
def rect(self, *args, **kwargs) -> Self:
|
def rect(self, *args, **kwargs) -> Self:
|
||||||
self.pattern.rect(*args, **kwargs)
|
self.pattern.rect(*args, **kwargs)
|
||||||
return self
|
|
||||||
|
|
||||||
@wraps(Pattern.path)
|
@wraps(Pattern.path)
|
||||||
def path(self, *args, **kwargs) -> Self:
|
def path(self, *args, **kwargs) -> Self:
|
||||||
self.pattern.path(*args, **kwargs)
|
self.pattern.path(*args, **kwargs)
|
||||||
return self
|
|
||||||
|
|
||||||
def plug(
|
def plug(
|
||||||
self,
|
self,
|
||||||
|
@ -87,7 +87,7 @@ class Pattern(PortList, AnnotatableImpl, Mirrorable):
|
|||||||
__slots__ = (
|
__slots__ = (
|
||||||
'shapes', 'labels', 'refs', '_ports',
|
'shapes', 'labels', 'refs', '_ports',
|
||||||
# inherited
|
# inherited
|
||||||
'_annotations',
|
'_offset', '_annotations',
|
||||||
)
|
)
|
||||||
|
|
||||||
shapes: defaultdict[layer_t, list[Shape]]
|
shapes: defaultdict[layer_t, list[Shape]]
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
from typing import Callable, TYPE_CHECKING, Any
|
from typing import Callable, Self, TYPE_CHECKING
|
||||||
from abc import ABCMeta, abstractmethod
|
from abc import ABCMeta, abstractmethod
|
||||||
|
|
||||||
import numpy
|
import numpy
|
||||||
@ -32,12 +32,12 @@ class Shape(PositionableImpl, Rotatable, Mirrorable, Copyable, Scalable,
|
|||||||
"""
|
"""
|
||||||
__slots__ = () # Children should use AutoSlots or set slots themselves
|
__slots__ = () # Children should use AutoSlots or set slots themselves
|
||||||
|
|
||||||
#def __copy__(self) -> Self:
|
def __copy__(self) -> Self:
|
||||||
# cls = self.__class__
|
cls = self.__class__
|
||||||
# new = cls.__new__(cls)
|
new = cls.__new__(cls)
|
||||||
# for name in self.__slots__: # type: str
|
for name in self.__slots__: # type: str
|
||||||
# object.__setattr__(new, name, getattr(self, name))
|
object.__setattr__(new, name, getattr(self, name))
|
||||||
# return new
|
return new
|
||||||
|
|
||||||
#
|
#
|
||||||
# Methods (abstract)
|
# Methods (abstract)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user