Skip to content

Commit

Permalink
Merge pull request #3499 from Textualize/typing-timer-callback
Browse files Browse the repository at this point in the history
Be less strict about typing timer callbacks.
  • Loading branch information
rodrigogiraoserrao authored Oct 27, 2023
2 parents 41cadfc + 73795bf commit 33a1d34
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
- `Pilot.click`/`Pilot.hover` now raises `OutOfBounds` when clicking outside visible screen https://github.com/Textualize/textual/pull/3360
- `Pilot.click`/`Pilot.hover` now return a Boolean indicating whether the click/hover landed on the widget that matches the selector https://github.com/Textualize/textual/pull/3360
- Added a delay to when the `No Matches` message appears in the command palette, thus removing a flicker https://github.com/Textualize/textual/pull/3399
- Timer callbacks are now typed more loosely https://github.com/Textualize/textual/issues/3434

## [0.38.1] - 2023-09-21

Expand Down
1 change: 0 additions & 1 deletion src/textual/_work_decorator.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
"""
A decorator used to create [workers](/guide/workers).
"""

Expand Down
4 changes: 2 additions & 2 deletions src/textual/timer.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

import weakref
from asyncio import CancelledError, Event, Task
from typing import Awaitable, Callable, Union
from typing import Any, Awaitable, Callable, Union

from rich.repr import Result, rich_repr

Expand All @@ -19,7 +19,7 @@
from ._time import sleep
from ._types import MessageTarget

TimerCallback = Union[Callable[[], Awaitable[None]], Callable[[], None]]
TimerCallback = Union[Callable[[], Awaitable[Any]], Callable[[], Any]]
"""Type of valid callbacks to be used with timers."""


Expand Down

0 comments on commit 33a1d34

Please sign in to comment.