We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e71fd49 commit 8a4333fCopy full SHA for 8a4333f
1 file changed
pre_commit_hooks/check_case_conflict.py
@@ -15,10 +15,11 @@ def lower_set(iterable: Iterable[str]) -> Set[str]:
15
16
17
def parents(file: str) -> Iterator[str]:
18
- file = os.path.dirname(file)
19
- while file:
20
- yield file
21
+ path_parts = file.split('/')
+ path_parts.pop()
+ while path_parts:
+ yield '/'.join(path_parts)
22
23
24
25
def directories_for(files: Set[str]) -> Set[str]:
0 commit comments