Method: rich.spinner.Spinner.update
Calls: 3, Exceptions: 0, Paths: 3Back
Path 1: 1 calls (0.33)
'' (1)
None (1)
0.5 (1)
1def update(
2 self,
3 *,
4 text: "RenderableType" = "",
5 style: Optional["StyleType"] = None,
6 speed: Optional[float] = None,
7 ) -> None:
8 """Updates attributes of a spinner after it has been started.
9
10 Args:
11 text (RenderableType, optional): A renderable to display at the right of the spinner (str or Text typically). Defaults to "".
12 style (StyleType, optional): Style for spinner animation. Defaults to None.
13 speed (float, optional): Speed factor for animation. Defaults to None.
14 """
15 if text:
16 self.text = Text.from_markup(text) if isinstance(text, str) else text
17 if style:
18 self.style = style
19 if speed:
20 self._update_speed = speed
Path 2: 1 calls (0.33)
Rule (1)
None (1)
None (1)
1def update(
2 self,
3 *,
4 text: "RenderableType" = "",
5 style: Optional["StyleType"] = None,
6 speed: Optional[float] = None,
7 ) -> None:
8 """Updates attributes of a spinner after it has been started.
9
10 Args:
11 text (RenderableType, optional): A renderable to display at the right of the spinner (str or Text typically). Defaults to "".
12 style (StyleType, optional): Style for spinner animation. Defaults to None.
13 speed (float, optional): Speed factor for animation. Defaults to None.
14 """
15 if text:
16 self.text = Text.from_markup(text) if isinstance(text, str) else text
17 if style:
18 self.style = style
19 if speed:
20 self._update_speed = speed
Path 3: 1 calls (0.33)
'bar' (1)
'red' (1)
2.0 (1)
1def update(
2 self,
3 *,
4 text: "RenderableType" = "",
5 style: Optional["StyleType"] = None,
6 speed: Optional[float] = None,
7 ) -> None:
8 """Updates attributes of a spinner after it has been started.
9
10 Args:
11 text (RenderableType, optional): A renderable to display at the right of the spinner (str or Text typically). Defaults to "".
12 style (StyleType, optional): Style for spinner animation. Defaults to None.
13 speed (float, optional): Speed factor for animation. Defaults to None.
14 """
15 if text:
16 self.text = Text.from_markup(text) if isinstance(text, str) else text
17 if style:
18 self.style = style
19 if speed:
20 self._update_speed = speed