From ec7a7e227c1d7d67c126842a4916fde15c26b2cc Mon Sep 17 00:00:00 2001
From: wurstsalat <mailtrash@posteo.de>
Date: Fri, 27 May 2022 00:11:43 +0200
Subject: [PATCH] chore: PEP: Add type annotations

---
 gajim/common/modules/pep.py | 10 +++++++---
 pyrightconfig.json          |  1 +
 2 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/gajim/common/modules/pep.py b/gajim/common/modules/pep.py
index f2028e81f5..748e1c777d 100644
--- a/gajim/common/modules/pep.py
+++ b/gajim/common/modules/pep.py
@@ -14,17 +14,21 @@
 
 # XEP-0163: Personal Eventing Protocol
 
-from gajim.common.types import ConnectionT
+from __future__ import annotations
+
+from nbxmpp.structs import DiscoInfo
+
+from gajim.common import types
 from gajim.common.modules.base import BaseModule
 
 
 class PEP(BaseModule):
-    def __init__(self, con: ConnectionT) -> None:
+    def __init__(self, con: types.Client) -> None:
         BaseModule.__init__(self, con)
 
         self.supported = False
 
-    def pass_disco(self, info):
+    def pass_disco(self, info: DiscoInfo) -> None:
         for identity in info.identities:
             if identity.category == 'pubsub':
                 if identity.type == 'pep':
diff --git a/pyrightconfig.json b/pyrightconfig.json
index 5e4f5ca010..91388eb8e9 100644
--- a/pyrightconfig.json
+++ b/pyrightconfig.json
@@ -30,6 +30,7 @@
         "gajim/common/idle.py",
         "gajim/common/logging_helpers.py",
         "gajim/common/modules/chat_markers.py",
+        "gajim/common/modules/pep.py",
         "gajim/common/modules/register.py",
         "gajim/common/passwords.py",
         "gajim/common/regex.py",
-- 
GitLab