Skip to content

Commit 60e1c61

Browse files
Moisanmliu08
authored andcommitted
STYLE: fix pylint useless-else-on-loop warnings (pandas-dev#49595)
1 parent 1aa8c96 commit 60e1c61

File tree

3 files changed

+2
-5
lines changed

3 files changed

+2
-5
lines changed

pandas/core/internals/array_manager.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -697,8 +697,7 @@ def _equal_values(self, other) -> bool:
697697
for left, right in zip(self.arrays, other.arrays):
698698
if not array_equals(left, right):
699699
return False
700-
else:
701-
return True
700+
return True
702701

703702
# TODO
704703
# to_dict

pyproject.toml

-1
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,6 @@ disable = [
169169
"unused-import",
170170
"unused-variable",
171171
"using-constant-test",
172-
"useless-else-on-loop",
173172
"useless-parent-delegation"
174173
]
175174

scripts/sync_flake8_versions.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,7 @@ def _get_repo_hook(repos: Sequence[Repo], hook_name: str) -> tuple[Repo, YamlMap
5555
for hook in repo["hooks"]:
5656
if hook["id"] == hook_name:
5757
return repo, hook
58-
else: # pragma: no cover
59-
raise RuntimeError(f"Repo with hook {hook_name} not found")
58+
raise RuntimeError(f"Repo with hook {hook_name} not found") # pragma: no cover
6059

6160

6261
def _conda_to_pip_compat(dep):

0 commit comments

Comments
 (0)