Missing get() method for class Events(Enum)
This commit is contained in:
@@ -36,3 +36,7 @@ class Events(Enum):
|
||||
|
||||
def __str__(self):
|
||||
return self.name
|
||||
|
||||
@classmethod
|
||||
def get(cls, key):
|
||||
return getattr(cls, str(key)) if str(key) in dir(cls) else None
|
||||
|
||||
Reference in New Issue
Block a user