You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Please give a brief but clear explanation of the issue. If you can, include a complete working example that demonstrates the bug. Check it can run without modifications.
from textual import work
from textual.app import App
class testy(App):
@work
async def worky(self) -> None:
pass
def compose(self):
self.set_timer(1, self.worky)
$ pyright test.py
/home/guy/gits/ttuna/test.py
/home/guy/gits/ttuna/test.py:8:27 - error: Argument of type "() -> Worker[None]" cannot be assigned to parameter "callback" of type "TimerCallback | None" in function "set_timer"
Type "() -> Worker[None]" cannot be assigned to type "TimerCallback | None"
Type "() -> Worker[None]" cannot be assigned to type "() -> Awaitable[None]"
Function return type "Worker[None]" is incompatible with type "Awaitable[None]"
"Worker[None]" is incompatible with protocol "Awaitable[None]"
"__await__" is not present
Type "() -> Worker[None]" cannot be assigned to type "() -> None"
Function return type "Worker[None]" is incompatible with type "None"
Type cannot be assigned to type "None"
... (reportGeneralTypeIssues)
1 error, 0 warnings, 0 informations
The same error is reported for set_interval as well
The text was updated successfully, but these errors were encountered:
Have you checked closed issues? https://github.com/Textualize/textual/issues?q=is%3Aissue+is%3Aclosed
yes
Please give a brief but clear explanation of the issue. If you can, include a complete working example that demonstrates the bug. Check it can run without modifications.
The same error is reported for
set_interval
as wellThe text was updated successfully, but these errors were encountered: