8000 ENH: Make `np.number` generic with respect to its precision by BvB93 · Pull Request #17540 · numpy/numpy · GitHub
[go: up one dir, main page]

Skip to content

ENH: Make np.number generic with respect to its precision #17540

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 12 commits into from
Oct 21, 2020
Merged
Prev Previous commit
Next Next commit
TST: Ignore all * characters in the reveal tests
Mypy uses a `*` whenever an annotation or one of its parameters is based on a TypeVar.

Its added value is neglible and it unnecessarily complicates the `reveal` tests so lets just ignore them.

Note that this is done after running mypy, so it won't affect cases where `*` is used as multiplication operator.
  • Loading branch information
Bas van Beek committed Oct 17, 2020
commit b84946d15e5b63f44cd4bbbc04e5230a18720afc
5 changes: 3 additions & 2 deletions numpy/typing/tests/test_typing.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,9 +114,10 @@ def test_reveal(path):
])

with open(path) as fin:
lines = fin.readlines()
lines = fin.read().replace('*', '').split("\n")

for error_line in stdout.split("\n"):
stdout_list = stdout.replace('*', '').split("\n")
for error_line in stdout_list:
error_line = error_line.strip()
if not error_line:
continue
Expand Down
0