Skip to content

Commit 6a5b7f7

Browse files
committed
review feedback
1 parent bee802e commit 6a5b7f7

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

pre_commit_hooks/check_case_conflict.py

+3-4
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,10 @@ def lower_set(iterable: Iterable[str]) -> Set[str]:
1515

1616

1717
def parents(file: str) -> Iterator[str]:
18-
while True:
19-
file = os.path.dirname(file)
20-
if not file:
21-
return
18+
file = os.path.dirname(file)
19+
while file:
2220
yield file
21+
file = os.path.dirname(file)
2322

2423

2524
def directories_for(files: Set[str]) -> Set[str]:

0 commit comments

Comments
 (0)