Currently SimpleComponent and GenericComponentAssembly classes have a classname attribute and an identifier attribute which are initialised to the same value. During operation the identifier gets updated e.g. from pin to pin0, pin1 etc. based on the cubit design tree.
Since the original name is not an aspect of the instance, it should be a class variable defined, something like:
class Pin:
name = "pin"
def __init__(self):
self.identifier = self.name
If we implement abstract base classes, subclasses could be required to have a name property like so, and a class variable would satisfy that requirement:
class Assembly(ABC):
@property
@abstractmethod
def name(self) -> str:
"""Name of the assembly type."""
Edit: spelling