mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-03 20:14:50 -04:00
Add missing type hints to synapse.crypto. (#11146)
And require type hints for this module.
This commit is contained in:
parent
09eff1b3db
commit
0f9adc99ad
5 changed files with 36 additions and 18 deletions
|
@ -87,7 +87,7 @@ class VerifyJsonRequest:
|
|||
server_name: str,
|
||||
json_object: JsonDict,
|
||||
minimum_valid_until_ms: int,
|
||||
):
|
||||
) -> "VerifyJsonRequest":
|
||||
"""Create a VerifyJsonRequest to verify all signatures on a signed JSON
|
||||
object for the given server.
|
||||
"""
|
||||
|
@ -104,7 +104,7 @@ class VerifyJsonRequest:
|
|||
server_name: str,
|
||||
event: EventBase,
|
||||
minimum_valid_until_ms: int,
|
||||
):
|
||||
) -> "VerifyJsonRequest":
|
||||
"""Create a VerifyJsonRequest to verify all signatures on an event
|
||||
object for the given server.
|
||||
"""
|
||||
|
@ -449,7 +449,9 @@ class StoreKeyFetcher(KeyFetcher):
|
|||
|
||||
self.store = hs.get_datastore()
|
||||
|
||||
async def _fetch_keys(self, keys_to_fetch: List[_FetchKeyRequest]):
|
||||
async def _fetch_keys(
|
||||
self, keys_to_fetch: List[_FetchKeyRequest]
|
||||
) -> Dict[str, Dict[str, FetchKeyResult]]:
|
||||
key_ids_to_fetch = (
|
||||
(queue_value.server_name, key_id)
|
||||
for queue_value in keys_to_fetch
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue