diff --git a/masque/__init__.py b/masque/__init__.py index f0e777e..5a715c9 100644 --- a/masque/__init__.py +++ b/masque/__init__.py @@ -35,7 +35,7 @@ from .pattern import Pattern from .utils import layer_t, annotations_t from .library import Library, MutableLibrary, WrapROLibrary, WrapLibrary, LazyLibrary from .ports import Port, PortList -from .builder import Builder, PortsRef, Tool +from .builder import Builder, Abstract, Tool __author__ = 'Jan Petykiewicz' diff --git a/masque/builder/__init__.py b/masque/builder/__init__.py index a922870..1fabfbf 100644 --- a/masque/builder/__init__.py +++ b/masque/builder/__init__.py @@ -1,3 +1,3 @@ -from .builder import Builder, PortsRef +from .builder import Builder, Abstract from .utils import ell from .tools import Tool diff --git a/masque/builder/builder.py b/masque/builder/builder.py index fd6e5f4..de3a160 100644 --- a/masque/builder/builder.py +++ b/masque/builder/builder.py @@ -19,11 +19,10 @@ from .utils import ell logger = logging.getLogger(__name__) -B = TypeVar('B', bound='Builder') -PR = TypeVar('PR', bound='PortsRef') +BB = TypeVar('BB', bound='Builder') -class PortsRef(PortList): +class Abstract(PortList): __slots__ = ('name', 'ports') name: str @@ -60,7 +59,7 @@ class PortsRef(PortList): # TODO do we want to store a Ref instead of just a name? then we can translate/rotate/mirror... def __repr__(self) -> str: - s = f'