mirror of
https://github.com/1j01/textual-paint.git
synced 2024-12-22 06:11:37 +03:00
Add assert for type checker
This commit is contained in:
parent
26f6bfe8ed
commit
43ae6f7365
@ -81,6 +81,7 @@ class PilotRecorder():
|
|||||||
self.app_on_event = on_event
|
self.app_on_event = on_event
|
||||||
|
|
||||||
def record_event(self, event: Event) -> None:
|
def record_event(self, event: Event) -> None:
|
||||||
|
assert self.app is not None, "app should be set if we're recording an event from it"
|
||||||
if self.replaying:
|
if self.replaying:
|
||||||
return
|
return
|
||||||
if isinstance(event, (MouseDown, MouseMove, MouseUp)):
|
if isinstance(event, (MouseDown, MouseMove, MouseUp)):
|
||||||
|
Loading…
Reference in New Issue
Block a user