parent
140cf890e3
commit
f96f2eaf8a
67 changed files with 421 additions and 361 deletions
|
|
@ -7,7 +7,7 @@ class TestComponent(CustomComponent):
|
|||
def refresh_values(self):
|
||||
# This is a function that will be called every time the component is updated
|
||||
# and should return a list of random strings
|
||||
return [f"Random {random.randint(1, 100)}" for _ in range(5)]
|
||||
return [f"Random {random.randint(1, 100)}" for _ in range(5)] # noqa: S311
|
||||
|
||||
def build_config(self):
|
||||
return {"param": {"display_name": "Param", "options": self.refresh_values}}
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ class MultipleOutputsComponent(Component):
|
|||
]
|
||||
|
||||
def certain_output(self) -> int:
|
||||
return randint(0, self.number)
|
||||
return randint(0, self.number) # noqa: S311
|
||||
|
||||
def other_output(self) -> int:
|
||||
return self.certain_output()
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ class TestComponent(CustomComponent):
|
|||
def refresh_values(self):
|
||||
# This is a function that will be called every time the component is updated
|
||||
# and should return a list of random strings
|
||||
return [f"Random {random.randint(1, 100)}" for _ in range(5)]
|
||||
return [f"Random {random.randint(1, 100)}" for _ in range(5)] # noqa: S311
|
||||
|
||||
def build_config(self):
|
||||
return {"param": Input(display_name="Param", options=self.refresh_values)}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue