From 65b8046fe08a19df937068e5fe5ad15f9b0a785a Mon Sep 17 00:00:00 2001 From: Emmanuel Gil Peyrot Date: Sat, 12 Dec 2020 18:44:37 +0100 Subject: from __future__ import annotations MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Now that our baseline is Python 3.7, we can rely on type annotations to be lazily evaluated. --- poezio/user.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'poezio/user.py') diff --git a/poezio/user.py b/poezio/user.py index 5aed5031..3724d229 100644 --- a/poezio/user.py +++ b/poezio/user.py @@ -41,12 +41,12 @@ class User: deterministic=True, color='') -> None: # The oldest possible time - self.last_talked = datetime(1, 1, 1) # type: datetime + self.last_talked: datetime = datetime(1, 1, 1) self.update(affiliation, show, status, role) self.change_nick(nick) - self.jid = jid # type: JID - self.chatstate = None # type: Optional[str] - self.color = (1, 1) # type: Tuple[int, int] + self.jid: JID = jid + self.chatstate: Optional[str] = None + self.color: Tuple[int, int] = (1, 1) if color != '': self.change_color(color, deterministic) else: -- cgit v1.2.3