Skip to content

Commit 60706eb

Browse files
oprypincopybara-github
authored andcommitted
No public description
PiperOrigin-RevId: 683578686
1 parent 3e39a5c commit 60706eb

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

pytype/imports/typeshed.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,7 @@ def get_module_file(self, namespace, module, version):
306306
# Give precedence to MISSING_FILE
307307
if path_rel in self.missing:
308308
relpath = path_utils.join("nonexistent", path_rel + ".pyi")
309-
return self._store.filepath(relpath), builtin_stubs.DEFAULT_SRC
309+
return relpath, builtin_stubs.DEFAULT_SRC
310310
for path in [
311311
path_utils.join(path_rel, "__init__.pyi"),
312312
path_rel + ".pyi",

pytype/imports/typeshed_test.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,8 @@ def test_carriage_return(self):
113113
file_utils.replace_separator("stdlib/foo.pyi"), b"x: int\r\n"
114114
)
115115
self.ts._store = TypeshedTestFs(d.path)
116-
_, src = self.ts.get_module_file("stdlib", "foo", (3, 10))
116+
filename, src = self.ts.get_module_file("stdlib", "foo", (3, 10))
117+
self.assertEqual(file_utils.replace_separator("stdlib/foo.pyi"), filename)
117118
self.assertEqual(src, "x: int\n")
118119

119120

0 commit comments

Comments
 (0)