Commit f2d7e86f authored by mathieui's avatar mathieui

typing: add a bunch of type ignores

because this is too smart for mypy and I do not want to rewrite those
things right now.
parent fe1a325a
......@@ -264,9 +264,9 @@ class BaseXMPP(XMLStream):
if not pconfig:
pconfig = self.plugin_config.get(plugin, {})
if not self.plugin.registered(plugin):
if not self.plugin.registered(plugin): # type: ignore
load_plugin(plugin, module)
self.plugin.enable(plugin, pconfig)
self.plugin.enable(plugin, pconfig) # type: ignore
def register_plugins(self):
"""Register and initialize all built-in plugins.
......
......@@ -133,8 +133,9 @@ class ClientXMPP(BaseXMPP):
def password(self, value: str) -> None:
self.credentials['password'] = value
def connect(self, address: Optional[Tuple[str, int]] = None, use_ssl: bool = False,
force_starttls: bool = True, disable_starttls: bool = False) -> None:
def connect(self, address: Optional[Tuple[str, int]] = None, # type: ignore
use_ssl: bool = False, force_starttls: bool = True,
disable_starttls: bool = False) -> None:
"""Connect to the XMPP server.
When no address is given, a SRV lookup for the server will
......
......@@ -11,7 +11,7 @@ except ImportError:
# Python < 3.8
# just to make sure the imports do not break, but
# not usable.
from unittest import TestCase as IsolatedAsyncioTestCase
from unittest import TestCase as IsolatedAsyncioTestCase # type: ignore
from typing import (
Dict,
List,
......
......@@ -31,4 +31,4 @@ class XMLCallback(Callback):
stream processing. Used only by prerun.
Defaults to False.
"""
Callback.run(self, payload.xml, instream)
Callback.run(self, payload.xml, instream) # type: ignore
......@@ -28,4 +28,4 @@ class XMLWaiter(Waiter):
Arguments:
payload -- The matched stanza object.
"""
Waiter.prerun(self, payload.xml)
Waiter.prerun(self, payload.xml) # type: ignore
......@@ -1183,7 +1183,7 @@ class XMLStream(asyncio.BaseProtocol):
if filter in already_used:
continue
if iscoroutinefunction(filter):
data = await filter(data)
data = await filter(data) # type: ignore
else:
filter = cast(SyncFilter, filter)
data = filter(data)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment