Skip to content

Commit

Permalink
fix Effects.__iter__() for python3.10
Browse files Browse the repository at this point in the history
  • Loading branch information
charles-cooper committed Oct 16, 2024
1 parent ef84d70 commit 1c98c23
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions vyper/venom/effects.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ class Effects(Flag):
BALANCE = auto()
EXTCODE = auto()

def __iter__(self):
# python3.10 doesn't have an iter implementation. we can
# remove this once we drop python3.10 support.
return (m for m in self.__class__.__members__.values() if m in self)

Check warning on line 18 in vyper/venom/effects.py

View check run for this annotation

Codecov / codecov/patch

vyper/venom/effects.py#L18

Added line #L18 was not covered by tests


EMPTY = Effects(0)
ALL = ~EMPTY
Expand Down

0 comments on commit 1c98c23

Please sign in to comment.