Archived
1
1
Fork 0

add missing docstrings to Textual's notification

This commit is contained in:
Josh Lay 2023-05-02 19:22:13 -05:00
parent 5cd18b00e8
commit 4b4b7b5105
Signed by: jlay
GPG key ID: B265E45CACAD108A

View file

@ -39,10 +39,16 @@ from .utils import (
class Notification(Static):
'''Self-removing notification widget'''
def on_mount(self) -> None:
'''On the creation/display of the notification...
Creates a timer to remove itself in 3 seconds'''
self.set_timer(3, self.remove)
def on_click(self) -> None:
'''Fires when notification is clicked, removes the widget'''
self.remove()