BaseObject: allow keyword arguments
This commit is contained in:
@@ -29,12 +29,13 @@ class BaseObject(ABC):
|
||||
classes in the framework should inherit from this base class.
|
||||
"""
|
||||
|
||||
def __init__(self, *, name: Optional[str] = None):
|
||||
def __init__(self, *, name: Optional[str] = None, **kwargs):
|
||||
"""Initialize the base object.
|
||||
|
||||
Args:
|
||||
name: Optional custom name for the object. If not provided,
|
||||
generates a name using the class name and instance count.
|
||||
**kwargs: Additional arguments passed to parent class.
|
||||
"""
|
||||
self._id: int = obj_id()
|
||||
self._name = name or f"{self.__class__.__name__}#{obj_count(self)}"
|
||||
|
||||
Reference in New Issue
Block a user