File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -18,20 +18,20 @@ def __repr__(self):
1818 f"regex_based={ self .regex_based_patterns !r} )"
1919 )
2020
21- def __call__ (self , path ):
21+ def __call__ (self , filename : str , / ):
2222 """Determine if 'path' should be ignored."""
23- path = Path (path ).resolve ().as_posix ()
23+ normalised_path = Path (filename ).resolve ().as_posix ()
2424 # Any regular pattern matches.
2525 for pattern in self .regular_patterns :
2626 # separators are normalised before creating the IgnoreFilter
27- if path .startswith (f"{ pattern } /" ):
27+ if normalised_path .startswith (f"{ pattern } /" ):
2828 return True
29- if fnmatch .fnmatch (path , pattern ):
29+ if fnmatch .fnmatch (normalised_path , pattern ):
3030 return True
3131
3232 # Any regular expression matches.
3333 for regex in self .regex_based_patterns : # NoQA: SIM110
34- if regex .search (path ):
34+ if regex .search (normalised_path ):
3535 return True
3636
3737 return False
You can’t perform that action at this time.
0 commit comments