(self, seconds: float, msg: str = "timeout")
| 69 | """Context manager that raises TimeoutError after `seconds`.""" |
| 70 | |
| 71 | def __init__(self, seconds: float, msg: str = "timeout"): |
| 72 | self.seconds = seconds |
| 73 | self.msg = msg |
| 74 | self._use_signal = hasattr(signal, "SIGALRM") # Unix only |
| 75 | |
| 76 | def __enter__(self): |
| 77 | if self._use_signal: |
nothing calls this directly
no outgoing calls
no test coverage detected