comparison sat_pubsub/backend.py @ 481:0e801ae1869f

backend: use `typing.Dict[]` instead of `dict[]` to be compatible with Python 3.7
author Goffi <goffi@goffi.org>
date Tue, 06 Sep 2022 11:31:00 +0200
parents b544109ab4c4
children 70eddf92bf51
comparison
equal deleted inserted replaced
480:23a51b139024 481:0e801ae1869f
61 """ 61 """
62 62
63 import copy 63 import copy
64 import uuid 64 import uuid
65 import hashlib 65 import hashlib
66 from typing import Optional, List, Tuple 66 from typing import Optional, List, Tuple, Dict
67 67
68 from zope.interface import implementer 68 from zope.interface import implementer
69 69
70 from twisted.application import service 70 from twisted.application import service
71 from twisted.python import components, failure, log 71 from twisted.python import components, failure, log
1255 1255
1256 def addEltFromSubDict( 1256 def addEltFromSubDict(
1257 self, 1257 self,
1258 parent_elt: domish.Element, 1258 parent_elt: domish.Element,
1259 from_jid: Optional[jid.JID], 1259 from_jid: Optional[jid.JID],
1260 sub_dict: dict[str, str], 1260 sub_dict: Dict[str, str],
1261 namespace: Optional[str] = None, 1261 namespace: Optional[str] = None,
1262 ) -> None: 1262 ) -> None:
1263 """Generate <subscription> element from storage.getAllSubscriptions's dict 1263 """Generate <subscription> element from storage.getAllSubscriptions's dict
1264 1264
1265 @param parent_elt: element where the new subscription element must be added 1265 @param parent_elt: element where the new subscription element must be added