Get the current context. :param default: Default value to return if no context is set. If not provided and no context is set, a :exc:`LookupError` is raised.
(cls, default: _DefaultT | EllipsisType = ...)
| 63 | |
| 64 | @classmethod |
| 65 | def get(cls, default: _DefaultT | EllipsisType = ...) -> _ContextT | _DefaultT: |
| 66 | """Get the current context. |
| 67 | |
| 68 | :param default: Default value to return if no context is set. |
| 69 | If not provided and no context is set, a :exc:`LookupError` is raised. |
| 70 | """ |
| 71 | if default is not ...: |
| 72 | return _CURRENT_CONTEXT.get(default) |
| 73 | return _CURRENT_CONTEXT.get() |
no outgoing calls