Enable check_untyped_defs mypy option for src/

This option checks even functions which are not annotated. It's a good
step to ensure that existing type annotation are correct.

In a Pareto fashion, the last few holdouts are always the ugliest,
beware.
This commit is contained in:
Ran Benita
2020-05-01 14:40:16 +03:00
parent 848ab00663
commit 71dfdca4df
9 changed files with 65 additions and 31 deletions

View File

@@ -136,8 +136,9 @@ class WarningsRecorder(warnings.catch_warnings):
Adapted from `warnings.catch_warnings`.
"""
def __init__(self):
super().__init__(record=True)
def __init__(self) -> None:
# Type ignored due to the way typeshed handles warnings.catch_warnings.
super().__init__(record=True) # type: ignore[call-arg] # noqa: F821
self._entered = False
self._list = [] # type: List[warnings.WarningMessage]