Skip to content

Commit

Permalink
No public description
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 683578686
  • Loading branch information
oprypin authored and copybara-github committed Oct 8, 2024
1 parent 3e39a5c commit 60706eb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pytype/imports/typeshed.py
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ def get_module_file(self, namespace, module, version):
# Give precedence to MISSING_FILE
if path_rel in self.missing:
relpath = path_utils.join("nonexistent", path_rel + ".pyi")
return self._store.filepath(relpath), builtin_stubs.DEFAULT_SRC
return relpath, builtin_stubs.DEFAULT_SRC
for path in [
path_utils.join(path_rel, "__init__.pyi"),
path_rel + ".pyi",
Expand Down
3 changes: 2 additions & 1 deletion pytype/imports/typeshed_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,8 @@ def test_carriage_return(self):
file_utils.replace_separator("stdlib/foo.pyi"), b"x: int\r\n"
)
self.ts._store = TypeshedTestFs(d.path)
_, src = self.ts.get_module_file("stdlib", "foo", (3, 10))
filename, src = self.ts.get_module_file("stdlib", "foo", (3, 10))
self.assertEqual(file_utils.replace_separator("stdlib/foo.pyi"), filename)
self.assertEqual(src, "x: int\n")


Expand Down

0 comments on commit 60706eb

Please sign in to comment.