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

Function check_metadata

scripts/utils/check-dist.py:104–112  ·  view source on GitHub ↗
(archive: str, metadata: bytes, expected: tuple[list[str], str])

Source from the content-addressed store, hash-verified

102
103
104def check_metadata(archive: str, metadata: bytes, expected: tuple[list[str], str]) -> None:
105 header, _, description = metadata.decode().partition("\n\n")
106 actual_headers, expected_headers = Counter(header.split("\n")), Counter(expected[0])
107 for line in (actual_headers - expected_headers).elements():
108 problems.append(f"{archive}: its metadata has a line that does not follow from pyproject.toml: {line}")
109 for line in (expected_headers - actual_headers).elements():
110 problems.append(f"{archive}: its metadata lacks this line: {line}")
111 if description != expected[1]:
112 problems.append(f"{archive}: its description differs from README.md")
113
114
115def decompress(data: bytes, wbits: int) -> bytes | None:

Callers 1

mainFunction · 0.85

Calls 3

CounterClass · 0.85
decodeMethod · 0.80
appendMethod · 0.45

Tested by

no test coverage detected