diff options
author | Charles Harris <charlesr.harris@gmail.com> | 2021-10-04 09:04:56 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-04 09:04:56 -0600 |
commit | 86953fd4e123bba98c1aa7ba34b2fa0634fcdcce (patch) | |
tree | 65842613e8fb3787eb9ad56235c7258f9d6b856f | |
parent | 38caf37701a6aeef24642445da71c0a9d80320c6 (diff) | |
parent | c29d2ad2e9b5d7a41e20576f588061bceae1af3e (diff) | |
download | numpy-86953fd4e123bba98c1aa7ba34b2fa0634fcdcce.tar.gz |
Merge pull request #20019 from sistaseetaram/lgtm-mypy-plugin
MAINT:redundant 'else' statement with 'for' loop#19077
-rw-r--r-- | numpy/typing/mypy_plugin.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/numpy/typing/mypy_plugin.py b/numpy/typing/mypy_plugin.py index 5421d6bfa..5ac75f94d 100644 --- a/numpy/typing/mypy_plugin.py +++ b/numpy/typing/mypy_plugin.py @@ -131,9 +131,8 @@ if TYPE_CHECKING or MYPY_EX is None: for i, value in enumerate(iterable): if getattr(value, "id", None) == id: return i - else: - raise ValueError("Failed to identify a `ImportFrom` instance " - f"with the following id: {id!r}") + raise ValueError("Failed to identify a `ImportFrom` instance " + f"with the following id: {id!r}") def _override_imports( file: MypyFile, |