add type canvas (#6680)

add type canvas
### Type of change
- [x] Refactoring
This commit is contained in:
so95 2025-03-31 13:46:29 +07:00 committed by GitHub
parent 60b9c027c8
commit 1985ff7918
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -396,6 +396,8 @@ class ComponentBase(ABC):
)
def __init__(self, canvas, id, param: ComponentParamBase):
from agent.canvas import Canvas # Local import to avoid cyclic dependency
assert isinstance(canvas, Canvas), "canvas must be an instance of Canvas"
self._canvas = canvas
self._id = id
self._param = param