Skip to content

Commit b7fc2f4

Browse files
committed
fix(modulefinder): use subpath instead of relative_path in fscache.isdir check in matches_gitignore
1 parent 722047e commit b7fc2f4

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

mypy/modulefinder.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -711,7 +711,7 @@ def matches_gitignore(subpath: str, fscache: FileSystemCache, verbose: bool) ->
711711
dir, _ = os.path.split(subpath)
712712
for gi_path, gi_spec in find_gitignores(dir):
713713
relative_path = os.path.relpath(subpath, gi_path)
714-
if fscache.isdir(relative_path):
714+
if fscache.isdir(subpath):
715715
relative_path = relative_path + "/"
716716
if gi_spec.match_file(relative_path):
717717
if verbose:

0 commit comments

Comments
 (0)