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

Function is_file_content

src/opencode_ai/_files.py:27–30  ·  view source on GitHub ↗
(obj: object)

Source from the content-addressed store, hash-verified

25
26
27def is_file_content(obj: object) -> TypeGuard[FileContent]:
28 return (
29 isinstance(obj, bytes) or isinstance(obj, tuple) or isinstance(obj, io.IOBase) or isinstance(obj, os.PathLike)
30 )
31
32
33def assert_is_file_content(obj: object, *, key: str | None = None) -> None:

Callers 3

assert_is_file_contentFunction · 0.85
_transform_fileFunction · 0.85
_async_transform_fileFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected