Skip to content

Commit

Permalink
fix: StringEnum._generate_next_value_ signature (#3770)
Browse files Browse the repository at this point in the history
per the documentation, `_generate_next_value_` should be a staticmethod.

reference:
https://docs.python.org/3/library/enum.html#enum.Enum._generate_next_value_
  • Loading branch information
charles-cooper authored Feb 12, 2024
1 parent 37ef8f4 commit 261e3d9
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions vyper/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ def copy(self):

class StringEnum(enum.Enum):
# Must be first, or else won't work, specifies what .value is
@staticmethod
def _generate_next_value_(name, start, count, last_values):
return name.lower()

Expand Down

0 comments on commit 261e3d9

Please sign in to comment.