Skip to content

Commit 85ec0a7

Browse files
committed
Fix --package-root tests for Windows 3.13
A change to relpath in 3.13 seems to have broken the handling of paths beginning with `\\`.
1 parent 0c922ce commit 85ec0a7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mypy/fscache.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,9 +117,9 @@ def init_under_package_root(self, path: str) -> bool:
117117
if not stat.S_ISDIR(st.st_mode):
118118
return False
119119
ok = False
120-
drive, path = os.path.splitdrive(path) # Ignore Windows drive name
121120
if os.path.isabs(path):
122121
path = os.path.relpath(path)
122+
drive, path = os.path.splitdrive(path) # Ignore Windows drive name
123123
path = os.path.normpath(path)
124124
for root in self.package_root:
125125
if path.startswith(root):

0 commit comments

Comments
 (0)