(
frame: FrameType, event: str, operation: BuiltinFunctionType | None
)
| 21 | lock: UnixFileLock, error: type[BaseException] = KeyboardInterrupt |
| 22 | ) -> None: # pragma: needs fcntl |
| 23 | def interrupt( |
| 24 | frame: FrameType, event: str, operation: BuiltinFunctionType | None |
| 25 | ) -> None: # pragma: no cover # profile hooks run with tracing disabled |
| 26 | if ( |
| 27 | event == "c_return" |
| 28 | and frame.f_code.co_name == "open_into" |
| 29 | and (operation is os.open or getattr(operation, "__name__", None) == "extend") |
| 30 | ): |
| 31 | raise error |
| 32 | |
| 33 | previous = sys.getprofile() |
| 34 | sys.setprofile(interrupt) |
nothing calls this directly
no outgoing calls
no test coverage detected