(obj: object, *, key: str | None = None)
| 31 | |
| 32 | |
| 33 | def 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 |
no test coverage detected