From 507a2f82994910879b5aab39def46156799994e1 Mon Sep 17 00:00:00 2001 From: Will McGugan Date: Thu, 9 Feb 2023 09:42:05 +0000 Subject: [PATCH] No need to return a bool here --- src/textual/reactive.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/textual/reactive.py b/src/textual/reactive.py index 559111af4..3d3e79de6 100644 --- a/src/textual/reactive.py +++ b/src/textual/reactive.py @@ -215,7 +215,7 @@ class Reactive(Generic[ReactiveType]): def invoke_watcher( watch_function: Callable, old_value: object, value: object - ) -> bool: + ) -> None: """Invoke a watch function. Args: @@ -223,8 +223,6 @@ class Reactive(Generic[ReactiveType]): old_value: The old value of the attribute. value: The new value of the attribute. - Returns: - True if the watcher was run, or False if it was posted. """ _rich_traceback_omit = True param_count = count_parameters(watch_function) @@ -241,9 +239,6 @@ class Reactive(Generic[ReactiveType]): sender=obj, callback=partial(await_watcher, watch_result) ) ) - return False - else: - return True watch_function = getattr(obj, f"watch_{name}", None) if callable(watch_function):