Fix pycharm warnings

This commit is contained in:
Dan 2018-04-30 19:53:03 +02:00
parent 47d5889612
commit 35e1a76cef

View File

@ -68,10 +68,10 @@ class ChatAction(Enum):
@staticmethod @staticmethod
def from_string(action: str) -> "ChatAction": def from_string(action: str) -> "ChatAction":
for a in iter(ChatAction): for a in ChatAction:
if a.name.lower() == action.lower(): if a.name.lower() == action.lower():
return a return a
raise ValueError("Invalid ChatAction: '{}'. Possible types are {}".format( raise ValueError("Invalid ChatAction: '{}'. Possible types are {}".format(
action, [x.name.lower() for x in iter(ChatAction)] action, [x.name.lower() for x in ChatAction]
)) ))