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

Method extract_offset

Lib/test/test_zipimport.py:991–994  ·  view source on GitHub ↗
(name)

Source from the content-addressed store, hash-verified

989
990 else:
991 def extract_offset(name):
992 if m := re.search(r"-(0x[0-9a-f]{9})\.part$", name):
993 return int(m.group(1), base=16)
994 raise ValueError(f"{name=} does not fit expected pattern.")
995 offset_parts = [(extract_offset(n), n) for n in pre_built_zip_parts]
996 with open(TEMP_ZIP, "wb") as f:
997 for offset, part_fn in sorted(offset_parts):

Callers

nothing calls this directly

Calls 2

searchMethod · 0.45
groupMethod · 0.45

Tested by

no test coverage detected