Skip to content

Commit

Permalink
mypy
Browse files Browse the repository at this point in the history
  • Loading branch information
Borda committed Feb 7, 2023
1 parent d883b7c commit 9de3ac7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/lightning_utilities/core/enums.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,10 @@ def from_str(
return cls[enum_key]

warnings.warn(UserWarning(f"Invalid string: expected one of {allowed}, but got {value}."))
return None

@classmethod
def _allowed_matches(cls, source) -> list:
def _allowed_matches(cls, source: str) -> list:
keys, vals = [], []
for enum_key, enum_val in cls.__members__.items():
keys.append(enum_key)
Expand Down

0 comments on commit 9de3ac7

Please sign in to comment.