Add rich.repr.auto to the Changed message

This commit is contained in:
Dave Pearson
2023-04-03 21:41:48 +01:00
parent 52af6064ba
commit c74aaa4112

View File

@@ -2,7 +2,7 @@
from __future__ import annotations
from rich.repr import Result
import rich.repr
from ..containers import Container
from ..message import Message
@@ -30,6 +30,7 @@ class RadioSet(Container):
}
"""
@rich.repr.auto
class Changed(Message, bubble=True):
"""Posted when the pressed button in the set changes.
@@ -50,7 +51,7 @@ class RadioSet(Container):
self.index = radio_set.pressed_index
"""The index of the `RadioButton` that was pressed to make the change."""
def __rich_repr__(self) -> Result:
def __rich_repr__(self) -> rich.repr.Result:
yield "radio_set", self.radio_set
yield "pressed", self.pressed
yield "index", self.index