mypy: Clarify type hints in zulip_bots/.
This commit is contained in:
parent
8a74f576a3
commit
357a5e06f3
|
@ -129,7 +129,7 @@ def get_quiz_from_payload(payload: Dict[str, Any]) -> Dict[str, Any]:
|
|||
answered_options=[],
|
||||
pending=True,
|
||||
correct_letter=correct_letter,
|
||||
)
|
||||
) # type: Dict[str, Any]
|
||||
return quiz
|
||||
|
||||
def generate_quiz_id(storage: Any) -> str:
|
||||
|
|
|
@ -78,7 +78,7 @@ def get_handle(location: str) -> Optional[Callable[[Dict[str, Any]], Optional[st
|
|||
loader = spec.loader
|
||||
if loader is None:
|
||||
return None
|
||||
loader.exec_module(handler)
|
||||
loader.exec_module(handler) # type: ignore # FIXME: typeshed issue?
|
||||
return handler.handle # type: ignore
|
||||
except Exception as e:
|
||||
print(e)
|
||||
|
|
|
@ -19,7 +19,7 @@ def import_module_from_source(path: Text, name: Text) -> Any:
|
|||
loader = spec.loader
|
||||
if loader is None:
|
||||
return None
|
||||
loader.exec_module(module)
|
||||
loader.exec_module(module) # type: ignore # FIXME: typeshed issue?
|
||||
|
||||
return module
|
||||
|
||||
|
|
Loading…
Reference in a new issue