mypy: Clarify type hints in zulip_bots/.

This commit is contained in:
neiljp (Neil Pilgrim) 2019-11-06 06:32:48 -08:00 committed by Tim Abbott
parent 8a74f576a3
commit 357a5e06f3
3 changed files with 3 additions and 3 deletions

View file

@ -129,7 +129,7 @@ def get_quiz_from_payload(payload: Dict[str, Any]) -> Dict[str, Any]:
answered_options=[], answered_options=[],
pending=True, pending=True,
correct_letter=correct_letter, correct_letter=correct_letter,
) ) # type: Dict[str, Any]
return quiz return quiz
def generate_quiz_id(storage: Any) -> str: def generate_quiz_id(storage: Any) -> str:

View file

@ -78,7 +78,7 @@ def get_handle(location: str) -> Optional[Callable[[Dict[str, Any]], Optional[st
loader = spec.loader loader = spec.loader
if loader is None: if loader is None:
return None return None
loader.exec_module(handler) loader.exec_module(handler) # type: ignore # FIXME: typeshed issue?
return handler.handle # type: ignore return handler.handle # type: ignore
except Exception as e: except Exception as e:
print(e) print(e)

View file

@ -19,7 +19,7 @@ def import_module_from_source(path: Text, name: Text) -> Any:
loader = spec.loader loader = spec.loader
if loader is None: if loader is None:
return None return None
loader.exec_module(module) loader.exec_module(module) # type: ignore # FIXME: typeshed issue?
return module return module