MCPcopy Create free account
hub / github.com/bpython/bpython / __exit__

Method __exit__

bpython/repl.py:85–93  ·  view source on GitHub ↗
(
        self,
        exc_type: type[BaseException] | None,
        exc_val: BaseException | None,
        exc_tb: TracebackType | None,
    )

Source from the content-addressed store, hash-verified

83 self.start = time.monotonic()
84
85 def __exit__(
86 self,
87 exc_type: type[BaseException] | None,
88 exc_val: BaseException | None,
89 exc_tb: TracebackType | None,
90 ) -> Literal[False]:
91 self.last_command = time.monotonic() - self.start
92 self.running_time += self.last_command
93 return False
94
95 def reset_timer(self) -> None:
96 self.running_time = 0.0

Callers 1

on_suspendMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected