fix: code flash pr issues in Calculator and JSONCleaner Components (#5352)
* Update calculator.py * Update json_cleaner.py * [autofix.ci] apply automated fixes * updated init * updated format format --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
This commit is contained in:
parent
e25872b287
commit
41f83294a2
2 changed files with 4 additions and 4 deletions
|
|
@ -97,7 +97,7 @@ class JSONCleaner(Component):
|
|||
raise ValueError(msg) from e
|
||||
return s
|
||||
|
||||
def __init__(self):
|
||||
def __init__(self, *args, **kwargs):
|
||||
# Create a translation table that maps control characters to None
|
||||
super().__init__()
|
||||
super().__init__(*args, **kwargs)
|
||||
self.translation_table = str.maketrans("", "", "".join(chr(i) for i in range(32)) + chr(127))
|
||||
|
|
|
|||
|
|
@ -91,8 +91,8 @@ class CalculatorToolComponent(LCToolComponent):
|
|||
self.status = error_message
|
||||
return [Data(data={"error": error_message, "input": expression})]
|
||||
|
||||
def __init__(self):
|
||||
super().__init__()
|
||||
def __init__(self, *args, **kwargs):
|
||||
super().__init__(*args, **kwargs)
|
||||
self.operators = {
|
||||
ast.Add: operator.add,
|
||||
ast.Sub: operator.sub,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue