MCPcopy Index your code
hub / github.com/python/cpython / open_resource

Method open_resource

Lib/importlib/resources/abc.py:163–164  ·  view source on GitHub ↗
(self, resource: StrPath)

Source from the content-addressed store, hash-verified

161 """Return a Traversable object for the loaded package."""
162
163 def open_resource(self, resource: StrPath) -> io.BufferedReader:
164 return self.files().joinpath(resource).open('rb')
165
166 def resource_path(self, resource: Any) -> NoReturn:
167 raise FileNotFoundError(resource)

Callers

nothing calls this directly

Calls 3

filesMethod · 0.95
openMethod · 0.45
joinpathMethod · 0.45

Tested by

no test coverage detected