Skip to content

Commit

Permalink
fix mypy
Browse files Browse the repository at this point in the history
  • Loading branch information
dakk committed Oct 30, 2023
1 parent 08ddecf commit c5fc717
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions qlasskit/ast2logic/t_expression.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,9 @@ def translate_expression(expr, env: Env) -> TExp: # noqa: C901

def unroll_subscripts(sub, st):
if sys.version_info < (3, 9):
_sval = sub.slice.value
_sval = sub.slice.value # type: ignore
else:
_sval = sub.slice
_sval = sub.slice # type: ignore

if isinstance(sub.value, ast.Subscript):
st = f"{_sval.value}{'.' if st else ''}{st}"
Expand All @@ -67,9 +67,9 @@ def unroll_subscripts(sub, st):
raise exceptions.ExpressionNotHandledException(expr)

if sys.version_info < (3, 9):
_sval = expr.slice.value
_sval = expr.slice.value # type: ignore
else:
_sval = expr.slice
_sval = expr.slice # type: ignore

if not isinstance(_sval, ast.Constant):
raise exceptions.ExpressionNotHandledException(expr)
Expand Down

0 comments on commit c5fc717

Please sign in to comment.