mirror of https://github.com/Textualize/rich.git
Adds a name attribute to Spinner
Makes it nicer for validation and use of the `Spinner` object in later functions/classes.
This commit is contained in:
parent
349042fd89
commit
959c937e94
|
@ -11,6 +11,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
|
||||
- Updated the widths of some characters https://github.com/Textualize/rich/pull/3289
|
||||
|
||||
### Added
|
||||
|
||||
- Included a `name` attribute to the `Spinner` class https://github.com/Textualize/rich/pull/3359
|
||||
|
||||
## [13.7.0] - 2023-11-15
|
||||
|
||||
### Added
|
||||
|
|
|
@ -18,6 +18,7 @@ The following people have contributed to the development of Rich:
|
|||
- [Aryaz Eghbali](https://github.com/AryazE)
|
||||
- [Oleksis Fraga](https://github.com/oleksis)
|
||||
- [Andy Gimblett](https://github.com/gimbo)
|
||||
- [Kai Giokas](https://github.com/kaisforza)
|
||||
- [Michał Górny](https://github.com/mgorny)
|
||||
- [Nok Lam Chan](https://github.com/noklam)
|
||||
- [Leron Gray](https://github.com/daddycocoaman)
|
||||
|
|
|
@ -38,6 +38,7 @@ class Spinner:
|
|||
self.text: "Union[RenderableType, Text]" = (
|
||||
Text.from_markup(text) if isinstance(text, str) else text
|
||||
)
|
||||
self.name = name
|
||||
self.frames = cast(List[str], spinner["frames"])[:]
|
||||
self.interval = cast(float, spinner["interval"])
|
||||
self.start_time: Optional[float] = None
|
||||
|
|
Loading…
Reference in New Issue