We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent edb8391 commit 1b3c87eCopy full SHA for 1b3c87e
bpython/repl.py
@@ -63,11 +63,11 @@
63
class RuntimeTimer:
64
"""Calculate running time"""
65
66
- def __init__(self):
+ def __init__(self) -> None:
67
self.reset_timer()
68
self.time = time.monotonic if hasattr(time, "monotonic") else time.time
69
70
- def __enter__(self):
+ def __enter__(self) -> None:
71
self.start = self.time()
72
73
def __exit__(
@@ -80,11 +80,11 @@ def __exit__(
80
self.running_time += self.last_command
81
return False
82
83
- def reset_timer(self):
+ def reset_timer(self) -> None:
84
self.running_time = 0.0
85
self.last_command = 0.0
86
87
- def estimate(self):
+ def estimate(self) -> float:
88
return self.running_time - self.last_command
89
90
0 commit comments