MCPcopy Index your code
hub / github.com/RustPython/RustPython / read_text

Method read_text

Lib/importlib/metadata/__init__.py:907–917  ·  view source on GitHub ↗
(self, filename: str | os.PathLike[str])

Source from the content-addressed store, hash-verified

905 self._path = path
906
907 def read_text(self, filename: str | os.PathLike[str]) -> Optional[str]:
908 with suppress(
909 FileNotFoundError,
910 IsADirectoryError,
911 KeyError,
912 NotADirectoryError,
913 PermissionError,
914 ):
915 return self._path.joinpath(filename).read_text(encoding='utf-8')
916
917 return None
918
919 read_text.__doc__ = Distribution.read_text.__doc__
920

Callers

nothing calls this directly

Calls 3

suppressClass · 0.90
read_textMethod · 0.45
joinpathMethod · 0.45

Tested by

no test coverage detected