[notify] stronger typing of buttons

This commit is contained in:
Sam Schott 2020-12-09 15:05:15 +00:00
parent e901d284e2
commit 3c02655184
2 changed files with 3 additions and 3 deletions

View File

@ -64,7 +64,7 @@ class DesktopNotifier:
urgency: NotificationLevel = NotificationLevel.Normal, urgency: NotificationLevel = NotificationLevel.Normal,
icon: Optional[str] = None, icon: Optional[str] = None,
action: Optional[Callable] = None, action: Optional[Callable] = None,
buttons: Optional[Dict[str, Optional[Callable]]] = None, buttons: Optional[Dict[str, Callable]] = None,
) -> None: ) -> None:
""" """
Sends a desktop notification. Some arguments may be ignored, depending on the Sends a desktop notification. Some arguments may be ignored, depending on the
@ -166,7 +166,7 @@ class MaestralDesktopNotifier:
message: str, message: str,
level: int = FILECHANGE, level: int = FILECHANGE,
on_click: Optional[Callable] = None, on_click: Optional[Callable] = None,
buttons: Optional[Dict[str, Optional[Callable]]] = None, buttons: Optional[Dict[str, Callable]] = None,
) -> None: ) -> None:
""" """
Sends a desktop notification. Sends a desktop notification.

View File

@ -54,7 +54,7 @@ class Notification:
urgency: NotificationLevel = NotificationLevel.Normal, urgency: NotificationLevel = NotificationLevel.Normal,
icon: Optional[str] = None, icon: Optional[str] = None,
action: Optional[Callable] = None, action: Optional[Callable] = None,
buttons: Optional[Dict[str, Optional[Callable]]] = None, buttons: Optional[Dict[str, Callable]] = None,
) -> None: ) -> None:
self.title = title self.title = title