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

Method read_text

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

Source from the content-addressed store, hash-verified

1018 self._path = path
1019
1020 def read_text(self, filename: str | os.PathLike[str]) -> str | None:
1021 with suppress(
1022 FileNotFoundError,
1023 IsADirectoryError,
1024 KeyError,
1025 NotADirectoryError,
1026 PermissionError,
1027 ):
1028 return self._path.joinpath(filename).read_text(encoding='utf-8')
1029
1030 return None
1031
1032 read_text.__doc__ = Distribution.read_text.__doc__
1033

Callers

nothing calls this directly

Calls 3

suppressClass · 0.90
read_textMethod · 0.45
joinpathMethod · 0.45

Tested by

no test coverage detected