Attached to a :class:`CancelScope` upon cancellation with details of the source of the cancellation, which is then used to construct the string in a :exc:`Cancelled`. Users can pass a ``reason`` str to :meth:`CancelScope.cancel` to set it. Not publicly exported or documented.
| 322 | |
| 323 | @attrs.define |
| 324 | class CancelReason: |
| 325 | """Attached to a :class:`CancelScope` upon cancellation with details of the source of the |
| 326 | cancellation, which is then used to construct the string in a :exc:`Cancelled`. |
| 327 | Users can pass a ``reason`` str to :meth:`CancelScope.cancel` to set it. |
| 328 | |
| 329 | Not publicly exported or documented. |
| 330 | """ |
| 331 | |
| 332 | source: CancelReasonLiteral |
| 333 | source_task: str | None = None |
| 334 | reason: str | None = None |
| 335 | |
| 336 | |
| 337 | @attrs.define(eq=False) |
no outgoing calls
no test coverage detected
searching dependent graphs…