(exception_type: _ET)
| 101 | |
| 102 | |
| 103 | def _with_exception(exception_type: _ET) -> Callable[[_F], _WithException[_F, _ET]]: |
| 104 | def decorate(func: _F) -> _WithException[_F, _ET]: |
| 105 | func_with_exception = cast(_WithException[_F, _ET], func) |
| 106 | func_with_exception.Exception = exception_type |
| 107 | return func_with_exception |
| 108 | |
| 109 | return decorate |
| 110 | |
| 111 | |
| 112 | # Exposed helper methods. |
nothing calls this directly
no outgoing calls
no test coverage detected