MCPcopy Create free account
hub / github.com/pybind/pybind11 / read_tz_file

Function read_tz_file

tests/extra_python_package/test_files.py:172–177  ·  view source on GitHub ↗
(tar: tarfile.TarFile, name: str)

Source from the content-addressed store, hash-verified

170
171
172def read_tz_file(tar: tarfile.TarFile, name: str) -> bytes:
173 start = tar.getnames()[0].split("/")[0] + "/"
174 inner_file = tar.extractfile(tar.getmember(f"{start}{name}"))
175 assert inner_file
176 with contextlib.closing(inner_file) as f:
177 return f.read()
178
179
180def normalize_line_endings(value: bytes) -> bytes:

Callers 2

test_build_sdistFunction · 0.85
test_build_global_distFunction · 0.85

Calls 1

readMethod · 0.45

Tested by

no test coverage detected