Method: rich.live.Live.stop
Calls: 27, Exceptions: 0, Paths: 8Back
Path 1: 11 calls (0.41)
1def stop(self) -> None:
2 """Stop live rendering display."""
3 with self._lock:
4 if not self._started:
5 return
6 self.console.clear_live()
7 self._started = False
8
9 if self.auto_refresh and self._refresh_thread is not None:
10 self._refresh_thread.stop()
11 self._refresh_thread = None
12 # allow it to fully render on the last even if overflow
13 self.vertical_overflow = "visible"
14 with self.console:
15 try:
16 if not self._alt_screen and not self.console.is_jupyter:
17 self.refresh()
18 finally:
19 self._disable_redirect_io()
20 self.console.pop_render_hook()
21 if not self._alt_screen and self.console.is_terminal:
22 self.console.line()
23 self.console.show_cursor(True)
24 if self._alt_screen:
25 self.console.set_alt_screen(False)
26
27 if self.transient and not self._alt_screen:
28 self.console.control(self._live_render.restore_cursor())
29 if self.ipy_widget is not None and self.transient:
30 self.ipy_widget.close() # pragma: no cover
Path 2: 4 calls (0.15)
1def stop(self) -> None:
2 """Stop live rendering display."""
3 with self._lock:
4 if not self._started:
5 return
6 self.console.clear_live()
7 self._started = False
8
9 if self.auto_refresh and self._refresh_thread is not None:
10 self._refresh_thread.stop()
11 self._refresh_thread = None
12 # allow it to fully render on the last even if overflow
13 self.vertical_overflow = "visible"
14 with self.console:
15 try:
16 if not self._alt_screen and not self.console.is_jupyter:
17 self.refresh()
18 finally:
19 self._disable_redirect_io()
20 self.console.pop_render_hook()
21 if not self._alt_screen and self.console.is_terminal:
22 self.console.line()
23 self.console.show_cursor(True)
24 if self._alt_screen:
25 self.console.set_alt_screen(False)
26
27 if self.transient and not self._alt_screen:
28 self.console.control(self._live_render.restore_cursor())
29 if self.ipy_widget is not None and self.transient:
30 self.ipy_widget.close() # pragma: no cover
Path 3: 4 calls (0.15)
1def stop(self) -> None:
2 """Stop live rendering display."""
3 with self._lock:
4 if not self._started:
5 return
6 self.console.clear_live()
7 self._started = False
8
9 if self.auto_refresh and self._refresh_thread is not None:
10 self._refresh_thread.stop()
11 self._refresh_thread = None
12 # allow it to fully render on the last even if overflow
13 self.vertical_overflow = "visible"
14 with self.console:
15 try:
16 if not self._alt_screen and not self.console.is_jupyter:
17 self.refresh()
18 finally:
19 self._disable_redirect_io()
20 self.console.pop_render_hook()
21 if not self._alt_screen and self.console.is_terminal:
22 self.console.line()
23 self.console.show_cursor(True)
24 if self._alt_screen:
25 self.console.set_alt_screen(False)
26
27 if self.transient and not self._alt_screen:
28 self.console.control(self._live_render.restore_cursor())
29 if self.ipy_widget is not None and self.transient:
30 self.ipy_widget.close() # pragma: no cover
Path 4: 2 calls (0.07)
1def stop(self) -> None:
2 """Stop live rendering display."""
3 with self._lock:
4 if not self._started:
5 return
6 self.console.clear_live()
7 self._started = False
8
9 if self.auto_refresh and self._refresh_thread is not None:
10 self._refresh_thread.stop()
11 self._refresh_thread = None
12 # allow it to fully render on the last even if overflow
13 self.vertical_overflow = "visible"
14 with self.console:
15 try:
16 if not self._alt_screen and not self.console.is_jupyter:
17 self.refresh()
18 finally:
19 self._disable_redirect_io()
20 self.console.pop_render_hook()
21 if not self._alt_screen and self.console.is_terminal:
22 self.console.line()
23 self.console.show_cursor(True)
24 if self._alt_screen:
25 self.console.set_alt_screen(False)
26
27 if self.transient and not self._alt_screen:
28 self.console.control(self._live_render.restore_cursor())
29 if self.ipy_widget is not None and self.transient:
30 self.ipy_widget.close() # pragma: no cover
Path 5: 2 calls (0.07)
1def stop(self) -> None:
2 """Stop live rendering display."""
3 with self._lock:
4 if not self._started:
5 return
6 self.console.clear_live()
7 self._started = False
8
9 if self.auto_refresh and self._refresh_thread is not None:
10 self._refresh_thread.stop()
11 self._refresh_thread = None
12 # allow it to fully render on the last even if overflow
13 self.vertical_overflow = "visible"
14 with self.console:
15 try:
16 if not self._alt_screen and not self.console.is_jupyter:
17 self.refresh()
18 finally:
19 self._disable_redirect_io()
20 self.console.pop_render_hook()
21 if not self._alt_screen and self.console.is_terminal:
22 self.console.line()
23 self.console.show_cursor(True)
24 if self._alt_screen:
25 self.console.set_alt_screen(False)
26
27 if self.transient and not self._alt_screen:
28 self.console.control(self._live_render.restore_cursor())
29 if self.ipy_widget is not None and self.transient:
30 self.ipy_widget.close() # pragma: no cover
Path 6: 2 calls (0.07)
1def stop(self) -> None:
2 """Stop live rendering display."""
3 with self._lock:
4 if not self._started:
5 return
6 self.console.clear_live()
7 self._started = False
8
9 if self.auto_refresh and self._refresh_thread is not None:
10 self._refresh_thread.stop()
11 self._refresh_thread = None
12 # allow it to fully render on the last even if overflow
13 self.vertical_overflow = "visible"
14 with self.console:
15 try:
16 if not self._alt_screen and not self.console.is_jupyter:
17 self.refresh()
18 finally:
19 self._disable_redirect_io()
20 self.console.pop_render_hook()
21 if not self._alt_screen and self.console.is_terminal:
22 self.console.line()
23 self.console.show_cursor(True)
24 if self._alt_screen:
25 self.console.set_alt_screen(False)
26
27 if self.transient and not self._alt_screen:
28 self.console.control(self._live_render.restore_cursor())
29 if self.ipy_widget is not None and self.transient:
30 self.ipy_widget.close() # pragma: no cover
Path 7: 1 calls (0.04)
1def stop(self) -> None:
2 """Stop live rendering display."""
3 with self._lock:
4 if not self._started:
5 return
6 self.console.clear_live()
7 self._started = False
8
9 if self.auto_refresh and self._refresh_thread is not None:
10 self._refresh_thread.stop()
11 self._refresh_thread = None
12 # allow it to fully render on the last even if overflow
13 self.vertical_overflow = "visible"
14 with self.console:
15 try:
16 if not self._alt_screen and not self.console.is_jupyter:
17 self.refresh()
18 finally:
19 self._disable_redirect_io()
20 self.console.pop_render_hook()
21 if not self._alt_screen and self.console.is_terminal:
22 self.console.line()
23 self.console.show_cursor(True)
24 if self._alt_screen:
25 self.console.set_alt_screen(False)
26
27 if self.transient and not self._alt_screen:
28 self.console.control(self._live_render.restore_cursor())
29 if self.ipy_widget is not None and self.transient:
30 self.ipy_widget.close() # pragma: no cover
Path 8: 1 calls (0.04)
1def stop(self) -> None:
2 """Stop live rendering display."""
3 with self._lock:
4 if not self._started:
5 return
6 self.console.clear_live()
7 self._started = False
8
9 if self.auto_refresh and self._refresh_thread is not None:
10 self._refresh_thread.stop()
11 self._refresh_thread = None
12 # allow it to fully render on the last even if overflow
13 self.vertical_overflow = "visible"
14 with self.console:
15 try:
16 if not self._alt_screen and not self.console.is_jupyter:
17 self.refresh()
18 finally:
19 self._disable_redirect_io()
20 self.console.pop_render_hook()
21 if not self._alt_screen and self.console.is_terminal:
22 self.console.line()
23 self.console.show_cursor(True)
24 if self._alt_screen:
25 self.console.set_alt_screen(False)
26
27 if self.transient and not self._alt_screen:
28 self.console.control(self._live_render.restore_cursor())
29 if self.ipy_widget is not None and self.transient:
30 self.ipy_widget.close() # pragma: no cover