diff options
author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> | 2020-12-12 18:44:37 +0100 |
---|---|---|
committer | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> | 2020-12-12 19:36:18 +0100 |
commit | 65b8046fe08a19df937068e5fe5ad15f9b0a785a (patch) | |
tree | 827e17a99d39c5db453d0fc0e9b46249292aa4e3 /poezio/contact.py | |
parent | 34ec9e3ee1384506b2e803bdfe94201a7b7ff4c3 (diff) | |
download | poezio-65b8046fe08a19df937068e5fe5ad15f9b0a785a.tar.gz poezio-65b8046fe08a19df937068e5fe5ad15f9b0a785a.tar.bz2 poezio-65b8046fe08a19df937068e5fe5ad15f9b0a785a.tar.xz poezio-65b8046fe08a19df937068e5fe5ad15f9b0a785a.zip |
from __future__ import annotations
Now that our baseline is Python 3.7, we can rely on type annotations to
be lazily evaluated.
Diffstat (limited to 'poezio/contact.py')
-rw-r--r-- | poezio/contact.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/poezio/contact.py b/poezio/contact.py index 50ccab1f..3330a2a6 100644 --- a/poezio/contact.py +++ b/poezio/contact.py @@ -29,8 +29,8 @@ class Resource: data: the dict to use as a source """ # Full JID - self._jid = jid # type: str - self._data = data # type: Dict[str, Union[str, int]] + self._jid: str = jid + self._data: Dict[str, Union[str, int]] = data @property def jid(self) -> str: @@ -69,12 +69,12 @@ class Contact: item: a slixmpp RosterItem pointing to that contact """ self.__item = item - self.folded_states = defaultdict(lambda: True) # type: Dict[str, bool] + self.folded_states: Dict[str, bool] = defaultdict(lambda: True) self._name = '' self.avatar = None self.error = None - self.tune = {} # type: Dict[str, str] - self.gaming = {} # type: Dict[str, str] + self.tune: Dict[str, str] = {} + self.gaming: Dict[str, str] = {} self.mood = '' self.activity = '' |