Philipp Hörist pushed to branch master at gajim / gajim

Commits:

2 changed files:

Changes:

  • gajim/common/app.py
    ... ... @@ -51,6 +51,7 @@ from gajim.common.types import NetworkEventsControllerT # pylint: disable=unuse
    51 51
     from gajim.common.types import InterfaceT  # pylint: disable=unused-import
    
    52 52
     from gajim.common.types import LoggerT  # pylint: disable=unused-import
    
    53 53
     from gajim.common.types import ConnectionT  # pylint: disable=unused-import
    
    54
    +from gajim.common.types import LegacyContactsAPIT  # pylint: disable=unused-import
    
    54 55
     
    
    55 56
     interface = cast(InterfaceT, None)
    
    56 57
     thread_interface = lambda *args: None # Interface to run a thread and then a callback
    
    ... ... @@ -78,7 +79,7 @@ transport_type = {} # type: Dict[str, str]
    78 79
     # {acct1: {jid1: time1, jid2: time2}, }
    
    79 80
     last_message_time = {}  # type: Dict[str, Dict[str, float]]
    
    80 81
     
    
    81
    -contacts = None
    
    82
    +contacts = cast(LegacyContactsAPIT, None)
    
    82 83
     
    
    83 84
     # tell if we are connected to the room or not
    
    84 85
     # {acct: {room_jid: True}}
    

  • gajim/common/types.py
    ... ... @@ -32,6 +32,7 @@ if TYPE_CHECKING:
    32 32
         from gajim.common.zeroconf.connection_zeroconf import ConnectionZeroconf
    
    33 33
         from gajim.common.contacts import Contact
    
    34 34
         from gajim.common.contacts import GC_Contact
    
    35
    +    from gajim.common.contacts import LegacyContactsAPI
    
    35 36
         from gajim.common.nec import NetworkEvent
    
    36 37
         from gajim.common.nec import NetworkEventsController
    
    37 38
         from gajim.common.logger import Logger
    
    ... ... @@ -46,6 +47,7 @@ LoggerT = Union['Logger']
    46 47
     ConnectionT = Union['Client', 'ConnectionZeroconf']
    
    47 48
     ContactsT = Union['Contact', 'GC_Contact']
    
    48 49
     ContactT = Union['Contact']
    
    50
    +LegacyContactsAPIT = Union['LegacyContactsAPI']
    
    49 51
     
    
    50 52
     # PEP
    
    51 53
     PEPNotifyCallback = Callable[[nbxmpp.JID, nbxmpp.Node], None]