Skip to content

Commit

Permalink
Fix typehints
Browse files Browse the repository at this point in the history
  • Loading branch information
dweindl committed Dec 20, 2023
1 parent c898f30 commit 367115b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions python/sdist/amici/swig.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,9 @@ def _new_annot(self, old_annot: str):
) in self.mapping:
value_type_annot = self.mapping[value_type]
if isinstance(value_type_annot, ast.Constant):
return ast.Name(f"Tuple['{value_type_annot.value}']")
return ast.Name(f"tuple['{value_type_annot.value}']")

Check warning on line 100 in python/sdist/amici/swig.py

View check run for this annotation

Codecov / codecov/patch

python/sdist/amici/swig.py#L100

Added line #L100 was not covered by tests
if isinstance(value_type_annot, ast.Name):
return ast.Name(f"Tuple[{value_type_annot.id}]")
return ast.Name(f"tuple[{value_type_annot.id}]")

Check warning on line 102 in python/sdist/amici/swig.py

View check run for this annotation

Codecov / codecov/patch

python/sdist/amici/swig.py#L102

Added line #L102 was not covered by tests

return ast.Constant(old_annot)

Expand Down

0 comments on commit 367115b

Please sign in to comment.