Skip to content

Commit

Permalink
Use relative paths when matching exclude (#10078)
Browse files Browse the repository at this point in the history
Co-authored-by: hauntsaninja <>
  • Loading branch information
hauntsaninja authored and JukkaL committed Feb 15, 2021
1 parent 28668c8 commit 3b0b05d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mypy/modulefinder.py
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,7 @@ def find_modules_recursive(self, module: str) -> List[BuildSource]:
def matches_exclude(subpath: str, exclude: str, fscache: FileSystemCache, verbose: bool) -> bool:
if not exclude:
return False
subpath_str = os.path.abspath(subpath).replace(os.sep, "/")
subpath_str = os.path.relpath(subpath).replace(os.sep, "/")
if fscache.isdir(subpath):
subpath_str += "/"
if re.search(exclude, subpath_str):
Expand Down

0 comments on commit 3b0b05d

Please sign in to comment.