diff options
author | mathieui <mathieui@mathieui.net> | 2018-08-15 14:21:59 +0200 |
---|---|---|
committer | mathieui <mathieui@mathieui.net> | 2018-08-15 14:23:00 +0200 |
commit | 5ea82ac0af1cb855c9333796004c6a97da6b5ad4 (patch) | |
tree | f737e7e25012b76324ae03b591e19266a113a845 /poezio/tabs/bookmarkstab.py | |
parent | cccb1d97591966de1bab1b293294eefb17b90aac (diff) | |
download | poezio-5ea82ac0af1cb855c9333796004c6a97da6b5ad4.tar.gz poezio-5ea82ac0af1cb855c9333796004c6a97da6b5ad4.tar.bz2 poezio-5ea82ac0af1cb855c9333796004c6a97da6b5ad4.tar.xz poezio-5ea82ac0af1cb855c9333796004c6a97da6b5ad4.zip |
Fix mypy errors, add type annotations
Diffstat (limited to 'poezio/tabs/bookmarkstab.py')
-rw-r--r-- | poezio/tabs/bookmarkstab.py | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/poezio/tabs/bookmarkstab.py b/poezio/tabs/bookmarkstab.py index 1ee623c5..816402a7 100644 --- a/poezio/tabs/bookmarkstab.py +++ b/poezio/tabs/bookmarkstab.py @@ -3,27 +3,31 @@ Defines the data-forms Tab """ import logging -log = logging.getLogger(__name__) +from typing import Dict, Callable, List from poezio import windows from poezio.bookmarks import Bookmark, BookmarkList +from poezio.core.structs import Command from poezio.tabs import Tab from poezio.common import safeJID +log = logging.getLogger(__name__) + class BookmarksTab(Tab): """ A tab displaying lines of bookmarks, each bookmark having a 4 widgets to set the jid/password/autojoin/storage method """ - plugin_commands = {} + plugin_commands = {} # type: Dict[str, Command] + plugin_keys = {} # type: Dict[str, Callable] def __init__(self, core, bookmarks: BookmarkList): Tab.__init__(self, core) self.name = "Bookmarks" self.bookmarks = bookmarks - self.new_bookmarks = [] - self.removed_bookmarks = [] + self.new_bookmarks = [] # type: List[Bookmark] + self.removed_bookmarks = [] # type: List[Bookmark] self.header_win = windows.ColumnHeaderWin( ('name', 'room@server/nickname', 'password', 'autojoin', 'storage')) |