From 233a142aeab2d5888da49c22e9f65d36a9fa31d2 Mon Sep 17 00:00:00 2001 From: TomJGooding <101601846+TomJGooding@users.noreply.github.com> Date: Sat, 30 Nov 2024 09:04:11 +0000 Subject: [PATCH] docs(digits): fix update docstring raises type Fix the docstring for `Digits.update`, which raises a TypeError rather than a ValueError if the value is not a str. --- src/textual/widgets/_digits.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/textual/widgets/_digits.py b/src/textual/widgets/_digits.py index b85fe27525..86492ebe8f 100644 --- a/src/textual/widgets/_digits.py +++ b/src/textual/widgets/_digits.py @@ -6,6 +6,7 @@ if TYPE_CHECKING: from textual.app import RenderResult + from textual.geometry import Size from textual.renderables.digits import Digits as DigitsRenderable from textual.widget import Widget @@ -59,7 +60,7 @@ def update(self, value: str) -> None: value: New value to display. Raises: - ValueError: If the value isn't a `str`. + TypeError: If the value isn't a `str`. """ if not isinstance(value, str): raise TypeError("value must be a str")