-
-
Couldn't load subscription status.
- Fork 1k
Description
It looks like after the latest changes 0.11.0 (because in 0.10.1 there was no issue), the wrong type hint was used for DOMNode.watch method.
After upgrading textual in my project I see mypy errorrs like below:
Argument 3 to "watch" of "DOMNode" has incompatible type "Callable[[Any], None]"; expected "Union[Callable[[], Awaitable[None]], Callable[[], None]]" [arg-type]After some investigation, argument no.3 in the 0.11.0 is:
callback: CallbackType,which is:
CallbackType = Union[Callable[[], Awaitable[None]], Callable[[], None]]This is not true because Callabe can take additional arguments - current_value and previous_value (both of the Any type).
Previously, in the reactive.watch method, it was:
callback: Callable[[Any], object]Metadata
Metadata
Assignees
Labels
No labels