diff options
author | Ran Benita <ran@unusedvar.com> | 2020-05-01 14:40:16 +0300 |
---|---|---|
committer | Ran Benita <ran@unusedvar.com> | 2020-06-05 11:34:20 +0300 |
commit | 71dfdca4df6961460653c265026e194fbcaebef2 (patch) | |
tree | c6a88af4e3c29addc5fd95fd01ae36a3ef5fbfb4 /src/_pytest/python_api.py | |
parent | 848ab00663c9daf8cd27ee92dec1005cd9633152 (diff) | |
download | pytest-71dfdca4df6961460653c265026e194fbcaebef2.tar.gz |
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.
Diffstat (limited to 'src/_pytest/python_api.py')
-rw-r--r-- | src/_pytest/python_api.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/_pytest/python_api.py b/src/_pytest/python_api.py index 29c8af7e2..abace3196 100644 --- a/src/_pytest/python_api.py +++ b/src/_pytest/python_api.py @@ -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 |