Skip to content

Commit 959c937

Browse files
committed
Adds a name attribute to Spinner
Makes it nicer for validation and use of the `Spinner` object in later functions/classes.
1 parent 349042f commit 959c937

File tree

3 files changed

+6
-0
lines changed

3 files changed

+6
-0
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1111

1212
- Updated the widths of some characters https://github.com/Textualize/rich/pull/3289
1313

14+
### Added
15+
16+
- Included a `name` attribute to the `Spinner` class https://github.com/Textualize/rich/pull/3359
17+
1418
## [13.7.0] - 2023-11-15
1519

1620
### Added

CONTRIBUTORS.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ The following people have contributed to the development of Rich:
1818
- [Aryaz Eghbali](https://github.com/AryazE)
1919
- [Oleksis Fraga](https://github.com/oleksis)
2020
- [Andy Gimblett](https://github.com/gimbo)
21+
- [Kai Giokas](https://github.com/kaisforza)
2122
- [Michał Górny](https://github.com/mgorny)
2223
- [Nok Lam Chan](https://github.com/noklam)
2324
- [Leron Gray](https://github.com/daddycocoaman)

rich/spinner.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ def __init__(
3838
self.text: "Union[RenderableType, Text]" = (
3939
Text.from_markup(text) if isinstance(text, str) else text
4040
)
41+
self.name = name
4142
self.frames = cast(List[str], spinner["frames"])[:]
4243
self.interval = cast(float, spinner["interval"])
4344
self.start_time: Optional[float] = None

0 commit comments

Comments
 (0)