Add more type annotations

This commit is contained in:
Kovid Goyal
2021-10-27 14:00:29 +05:30
parent c899eb4ee3
commit 60472fcee3
7 changed files with 23 additions and 25 deletions

View File

@@ -194,12 +194,12 @@ def reset_registry() -> None:
id_counter = count()
def notify_with_command(cmd: NotificationCommand, window_id: int, notify: NotifyImplementation = notify_implementation) -> None:
def notify_with_command(cmd: NotificationCommand, window_id: int, notify_implementation: NotifyImplementation = notify_implementation) -> None:
title = cmd.title or cmd.body
body = cmd.body if cmd.title else ''
if title:
identifier = 'i' + str(next(id_counter))
notify_implementation(title, body, identifier=identifier)
notify_implementation(title, body, identifier)
register_identifier(identifier, cmd, window_id)