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:
@@ -508,7 +508,7 @@ def approx(expected, rel=None, abs=None, nan_ok=False):
|
||||
__tracebackhide__ = True
|
||||
|
||||
if isinstance(expected, Decimal):
|
||||
cls = ApproxDecimal
|
||||
cls = ApproxDecimal # type: Type[ApproxBase]
|
||||
elif isinstance(expected, Number):
|
||||
cls = ApproxScalar
|
||||
elif isinstance(expected, Mapping):
|
||||
@@ -534,7 +534,7 @@ def _is_numpy_array(obj):
|
||||
"""
|
||||
import sys
|
||||
|
||||
np = sys.modules.get("numpy")
|
||||
np = sys.modules.get("numpy") # type: Any
|
||||
if np is not None:
|
||||
return isinstance(obj, np.ndarray)
|
||||
return False
|
||||
|
||||
Reference in New Issue
Block a user