diff options
author | Bas van Beek <b.f.van.beek@vu.nl> | 2021-01-22 18:11:32 +0100 |
---|---|---|
committer | Bas van Beek <b.f.van.beek@vu.nl> | 2021-01-22 18:11:32 +0100 |
commit | e81141b9f8f9c10f136012e08eafda12249043cb (patch) | |
tree | 4af6274c681cbcad5252815bcdc4c5e79600ec2b | |
parent | ef0a3f068b042f676515382e917576234858fa0e (diff) | |
download | numpy-e81141b9f8f9c10f136012e08eafda12249043cb.tar.gz |
TST: Enable the `show_absolute_path` option in mypy.ini
-rw-r--r-- | numpy/typing/tests/data/mypy.ini | 1 | ||||
-rw-r--r-- | numpy/typing/tests/test_typing.py | 5 |
2 files changed, 2 insertions, 4 deletions
diff --git a/numpy/typing/tests/data/mypy.ini b/numpy/typing/tests/data/mypy.ini index 35cfbec89..548f76261 100644 --- a/numpy/typing/tests/data/mypy.ini +++ b/numpy/typing/tests/data/mypy.ini @@ -1,5 +1,6 @@ [mypy] plugins = numpy.typing.mypy_plugin +show_absolute_path = True [mypy-numpy] ignore_errors = True diff --git a/numpy/typing/tests/test_typing.py b/numpy/typing/tests/test_typing.py index 0e1faf781..f41aa2b6b 100644 --- a/numpy/typing/tests/test_typing.py +++ b/numpy/typing/tests/test_typing.py @@ -42,7 +42,6 @@ def run_mypy() -> None: if os.path.isdir(CACHE_DIR): shutil.rmtree(CACHE_DIR) - root = os.path.dirname(os.path.dirname(np.__file__)) for directory in (PASS_DIR, REVEAL_DIR, FAIL_DIR): # Run mypy stdout, stderr, _ = api.run([ @@ -58,9 +57,7 @@ def run_mypy() -> None: # Parse the output key = lambda n: n.split(':', 1)[0] iterator = itertools.groupby(stdout.split("\n"), key=key) - OUTPUT_MYPY.update( - (os.path.join(root, k), list(v)) for k, v in iterator if k - ) + OUTPUT_MYPY.update((k, list(v)) for k, v in iterator if k) def get_test_cases(directory): |