refactor: Fix type hint for _logs attribute in CustomComponent class
This commit is contained in:
parent
b99ff9f88e
commit
93ea76150f
1 changed files with 2 additions and 2 deletions
|
|
@ -81,7 +81,7 @@ class CustomComponent(BaseComponent):
|
||||||
status: Optional[Any] = None
|
status: Optional[Any] = None
|
||||||
"""The status of the component. This is displayed on the frontend. Defaults to None."""
|
"""The status of the component. This is displayed on the frontend. Defaults to None."""
|
||||||
_flows_data: Optional[List[Data]] = None
|
_flows_data: Optional[List[Data]] = None
|
||||||
_logs: Optional[List[Log]] = []
|
_logs: List[Log] = []
|
||||||
|
|
||||||
def update_state(self, name: str, value: Any):
|
def update_state(self, name: str, value: Any):
|
||||||
if not self.vertex:
|
if not self.vertex:
|
||||||
|
|
@ -92,7 +92,7 @@ class CustomComponent(BaseComponent):
|
||||||
raise ValueError(f"Error updating state: {e}")
|
raise ValueError(f"Error updating state: {e}")
|
||||||
|
|
||||||
def stop(self, output_name: str | None):
|
def stop(self, output_name: str | None):
|
||||||
if not output_name and len(self.vertex.outputs) == 1:
|
if not output_name and self.vertex and len(self.vertex.outputs) == 1:
|
||||||
output_name = self.vertex.outputs[0]["name"]
|
output_name = self.vertex.outputs[0]["name"]
|
||||||
else:
|
else:
|
||||||
raise ValueError("You must specify an output name to call stop")
|
raise ValueError("You must specify an output name to call stop")
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue