Closes `result` when it is a stream, which ends the span of its call.
(result: object)
| 3724 | |
| 3725 | |
| 3726 | async def close_stream(result: object) -> None: |
| 3727 | """Closes `result` when it is a stream, which ends the span of its call.""" |
| 3728 | if isinstance(result, Stream): |
| 3729 | result.close() |
| 3730 | elif isinstance(result, AsyncStream): |
| 3731 | await result.close() |
| 3732 | |
| 3733 | |
| 3734 | def test_option_types_are_exported() -> None: |