Skip to content

Commit

Permalink
Mark ExpressionNode.__iter__ as NoReturn
Browse files Browse the repository at this point in the history
  • Loading branch information
inducer committed Dec 19, 2024
1 parent 7546425 commit 8fa5dc0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pymbolic/primitives.py
Original file line number Diff line number Diff line change
Expand Up @@ -888,7 +888,7 @@ def __gt__(self, other) -> NoReturn:
def __abs__(self) -> ExpressionNode:
return Call(Variable("abs"), (self,))

def __iter__(self):
def __iter__(self) -> NoReturn:
# prevent infinite loops (e.g. when inserting into numpy arrays)
raise TypeError("expression types are not iterable")

Expand Down

0 comments on commit 8fa5dc0

Please sign in to comment.