summaryrefslogtreecommitdiff
path: root/slixmpp/basexmpp.py
diff options
context:
space:
mode:
Diffstat (limited to 'slixmpp/basexmpp.py')
-rw-r--r--slixmpp/basexmpp.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/slixmpp/basexmpp.py b/slixmpp/basexmpp.py
index 02c0b21c..47633d8f 100644
--- a/slixmpp/basexmpp.py
+++ b/slixmpp/basexmpp.py
@@ -11,10 +11,15 @@
:copyright: (c) 2011 Nathanael C. Fritz
:license: MIT, see LICENSE for more details
"""
+from __future__ import annotations
import asyncio
import logging
+from typing import (
+ TYPE_CHECKING,
+)
+
from slixmpp import plugins, roster, stanza
from slixmpp.api import APIRegistry
from slixmpp.exceptions import IqError, IqTimeout
@@ -33,6 +38,11 @@ from slixmpp.plugins import PluginManager, load_plugin
log = logging.getLogger(__name__)
+
+if TYPE_CHECKING:
+ from slixmpp.types import PluginsDict
+
+
class BaseXMPP(XMLStream):
"""
@@ -44,6 +54,10 @@ class BaseXMPP(XMLStream):
is used during initialization.
"""
+ # This is technically not correct, but much more useful to typecheck
+ # than the internal use of the PluginManager API
+ plugin: PluginsDict
+
def __init__(self, jid='', default_ns='jabber:client', **kwargs):
XMLStream.__init__(self, **kwargs)