Skip to content

Commit bee802e

Browse files
committed
review feedback
1 parent fd797fa commit bee802e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pre_commit_hooks/check_case_conflict.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import argparse
2+
import os.path
23
from typing import Iterable
34
from typing import Iterator
45
from typing import Optional
@@ -15,7 +16,7 @@ def lower_set(iterable: Iterable[str]) -> Set[str]:
1516

1617
def parents(file: str) -> Iterator[str]:
1718
while True:
18-
file = file[:file.rfind('/')]
19+
file = os.path.dirname(file)
1920
if not file:
2021
return
2122
yield file

0 commit comments

Comments
 (0)