MCPcopy Create free account
hub / github.com/anthropics/anthropic-sdk-python / check_sdist

Function check_sdist

scripts/utils/check-dist.py:236–242  ·  view source on GitHub ↗
(path: Path, package: str, committed: dict[str, Committed])

Source from the content-addressed store, hash-verified

234
235
236def check_sdist(path: Path, package: str, committed: dict[str, Committed]) -> bytes:
237 metadata = f"{package}/PKG-INFO"
238 allowed = {f"{package}/{name}": name for name in committed}
239 installed = {
240 name for name, file in allowed.items() if re.fullmatch(rf"src/.*|pyproject\.toml|README\.md|{LICENSE}", file)
241 }
242 return check_files(path.name, read_sdist(path), committed, allowed, {*installed, metadata}).get(metadata, b"")
243
244
245def main() -> None:

Callers 1

mainFunction · 0.85

Calls 3

check_filesFunction · 0.85
read_sdistFunction · 0.85
getMethod · 0.45

Tested by

no test coverage detected