summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCharles Harris <charlesr.harris@gmail.com>2021-10-04 09:04:56 -0600
committerGitHub <noreply@github.com>2021-10-04 09:04:56 -0600
commit86953fd4e123bba98c1aa7ba34b2fa0634fcdcce (patch)
tree65842613e8fb3787eb9ad56235c7258f9d6b856f
parent38caf37701a6aeef24642445da71c0a9d80320c6 (diff)
parentc29d2ad2e9b5d7a41e20576f588061bceae1af3e (diff)
downloadnumpy-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.py5
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,