Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
mbasaglia committed Oct 19, 2024
1 parent fe55313 commit 203001a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
1 change: 0 additions & 1 deletion tools/code_processing/pseudocode.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import re
import ast
from .python_to_ts import AstTranslator, IndentationManager


Expand Down
8 changes: 4 additions & 4 deletions tools/code_processing/python_to_ts.py
Original file line number Diff line number Diff line change
Expand Up @@ -470,11 +470,11 @@ def expression_to_string(self, value, annotation=False):
op = self.expression_to_string(value.op, annotation)
return self.expr_binop(op, *(self.expression_to_string(v, annotation) for v in value.values))
if isinstance(value, ast.Tuple):
return self.expr_sequence_literal_converter(value.elts, tuple)
return self.expr_sequence_literal_converter(value.elts, tuple, annotation)
if isinstance(value, ast.List):
return self.expr_sequence_literal_converter(value.elts, list)
return self.expr_sequence_literal_converter(value.elts, list, annotation)
if isinstance(value, ast.Set):
return self.expr_sequence_literal_converter(value.elts, set)
return self.expr_sequence_literal_converter(value.elts, set, annotation)
if isinstance(value, ast.Compare):
return self.expr_compare(value, annotation)
if isinstance(value, ast.MatchValue):
Expand All @@ -495,7 +495,7 @@ def expression_to_string(self, value, annotation=False):
return self.expr_starred(self.expression_to_string(value.value, annotation))
return self.other_expression(value, annotation)

def expr_sequence_literal_converter(self, elements, type):
def expr_sequence_literal_converter(self, elements, type, annotation):
return self.expr_sequence_literal([self.expression_to_string(v, annotation) for v in elements], type)

def expr_sequence_literal(self, elements, type):
Expand Down

0 comments on commit 203001a

Please sign in to comment.