(self, event: events.Timer)
| 900 | await invoke(event.callback) |
| 901 | |
| 902 | async def on_timer(self, event: events.Timer) -> None: |
| 903 | if not self.app._running: |
| 904 | return |
| 905 | event.prevent_default() |
| 906 | event.stop() |
| 907 | if event.callback is not None: |
| 908 | try: |
| 909 | self.app.screen |
| 910 | except Exception: |
| 911 | self.log.warning( |
| 912 | f"Not invoking timer callback {event.callback!r} because there is no screen." |
| 913 | ) |
| 914 | return |
| 915 | try: |
| 916 | await invoke(event.callback) |
| 917 | except Exception as error: |
| 918 | raise CallbackError( |
| 919 | f"unable to run callback {event.callback!r}; {error}" |
| 920 | ) |
nothing calls this directly
no test coverage detected