MCPcopy Create free account
hub / github.com/anomalyco/opencode-sdk-python / assert_is_file_content

Function assert_is_file_content

src/opencode_ai/_files.py:33–38  ·  view source on GitHub ↗
(obj: object, *, key: str | None = None)

Source from the content-addressed store, hash-verified

31
32
33def assert_is_file_content(obj: object, *, key: str | None = None) -> None:
34 if not is_file_content(obj):
35 prefix = f"Expected entry at `{key}`" if key is not None else f"Expected file input `{obj!r}`"
36 raise RuntimeError(
37 f"{prefix} to be bytes, an io.IOBase instance, PathLike or a tuple but received {type(obj)} instead."
38 ) from None
39
40
41@overload

Callers 1

_extract_itemsFunction · 0.85

Calls 1

is_file_contentFunction · 0.85

Tested by

no test coverage detected