Philipp Hörist pushed to branch master at gajim / gajim
Commits: 2ea5e3a1 by lovetox at 2020-04-18T11:58:32+02:00 Annotate variable
- - - - -
2 changed files:
- gajim/common/app.py - gajim/common/types.py
Changes:
===================================== gajim/common/app.py ===================================== @@ -51,6 +51,7 @@ from gajim.common.types import NetworkEventsControllerT # pylint: disable=unuse from gajim.common.types import InterfaceT # pylint: disable=unused-import from gajim.common.types import LoggerT # pylint: disable=unused-import from gajim.common.types import ConnectionT # pylint: disable=unused-import +from gajim.common.types import LegacyContactsAPIT # pylint: disable=unused-import
interface = cast(InterfaceT, None) thread_interface = lambda *args: None # Interface to run a thread and then a callback @@ -78,7 +79,7 @@ transport_type = {} # type: Dict[str, str] # {acct1: {jid1: time1, jid2: time2}, } last_message_time = {} # type: Dict[str, Dict[str, float]]
-contacts = None +contacts = cast(LegacyContactsAPIT, None)
# tell if we are connected to the room or not # {acct: {room_jid: True}}
===================================== gajim/common/types.py ===================================== @@ -32,6 +32,7 @@ if TYPE_CHECKING: from gajim.common.zeroconf.connection_zeroconf import ConnectionZeroconf from gajim.common.contacts import Contact from gajim.common.contacts import GC_Contact + from gajim.common.contacts import LegacyContactsAPI from gajim.common.nec import NetworkEvent from gajim.common.nec import NetworkEventsController from gajim.common.logger import Logger @@ -46,6 +47,7 @@ LoggerT = Union['Logger'] ConnectionT = Union['Client', 'ConnectionZeroconf'] ContactsT = Union['Contact', 'GC_Contact'] ContactT = Union['Contact'] +LegacyContactsAPIT = Union['LegacyContactsAPI']
# PEP PEPNotifyCallback = Callable[[nbxmpp.JID, nbxmpp.Node], None]
View it on GitLab: https://dev.gajim.org/gajim/gajim/-/commit/2ea5e3a1c970b4b4293a8918fdc38905e...