(self, _: Any)
| 158 | self._deferred_response: Deferred[Response] = Deferred(self._cancel) |
| 159 | |
| 160 | def _cancel(self, _: Any) -> None: |
| 161 | # Close this stream as gracefully as possible |
| 162 | # If the associated request is initiated we reset this stream |
| 163 | # else we directly call close() method |
| 164 | if self.metadata["request_sent"]: |
| 165 | self.reset_stream(StreamCloseReason.CANCELLED) |
| 166 | else: |
| 167 | self.close(StreamCloseReason.CANCELLED) |
| 168 | |
| 169 | def __repr__(self) -> str: |
| 170 | return f"Stream(id={self.stream_id!r})" |
nothing calls this directly
no test coverage detected