Skip to content

Commit

Permalink
clean up For visit
Browse files Browse the repository at this point in the history
  • Loading branch information
tserg committed Jan 7, 2024
1 parent 6b72c38 commit 8fe23c9
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions vyper/semantics/analysis/local.py
Original file line number Diff line number Diff line change
Expand Up @@ -431,11 +431,10 @@ def visit_For(self, node):
len_ = len(node.iter.elements)
self.expr_visitor.visit(node.iter, SArrayT(iter_type, len_))
if isinstance(node.iter, vy_ast.Call) and node.iter.func.id == "range":
for a in node.iter.args:
self.expr_visitor.visit(a, iter_type)
for a in node.iter.keywords:
if a.arg == "bound":
self.expr_visitor.visit(a.value, iter_type)
args = node.iter.args
kwargs = [s.value for s in node.iter.keywords]
for arg in (*args, *kwargs):
self.expr_visitor.visit(arg, iter_type)

def visit_If(self, node):
validate_expected_type(node.test, BoolT())
Expand Down

0 comments on commit 8fe23c9

Please sign in to comment.