diff options
author | Patrick Cloke <clokep@users.noreply.github.com> | 2021-09-20 08:56:23 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-20 08:56:23 -0400 |
commit | b3590614da7e3e17e75530a9d4808df17be9b127 (patch) | |
tree | c57aaff95611f6ca47fc9355602fac304c4d8a5a /synapse/handlers/federation_event.py | |
parent | Fix remove_stale_pushers job on SQLite. (#10843) (diff) | |
download | synapse-b3590614da7e3e17e75530a9d4808df17be9b127.tar.xz |
Require type hints in the handlers module. (#10831)
Adds missing type hints to methods in the synapse.handlers module and requires all methods to have type hints there. This also removes the unused construct_auth_difference method from the FederationHandler.
Diffstat (limited to 'synapse/handlers/federation_event.py')
-rw-r--r-- | synapse/handlers/federation_event.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/synapse/handlers/federation_event.py b/synapse/handlers/federation_event.py index 946343fa25..3b95beeb08 100644 --- a/synapse/handlers/federation_event.py +++ b/synapse/handlers/federation_event.py @@ -1016,7 +1016,7 @@ class FederationEventHandler: except Exception: logger.exception("Failed to resync device for %s", sender) - async def _handle_marker_event(self, origin: str, marker_event: EventBase): + async def _handle_marker_event(self, origin: str, marker_event: EventBase) -> None: """Handles backfilling the insertion event when we receive a marker event that points to one. @@ -1109,7 +1109,7 @@ class FederationEventHandler: event_map: Dict[str, EventBase] = {} - async def get_event(event_id: str): + async def get_event(event_id: str) -> None: with nested_logging_context(event_id): try: event = await self._federation_client.get_pdu( @@ -1218,7 +1218,7 @@ class FederationEventHandler: if not event_infos: return - async def prep(ev_info: _NewEventInfo): + async def prep(ev_info: _NewEventInfo) -> EventContext: event = ev_info.event with nested_logging_context(suffix=event.event_id): res = await self._state_handler.compute_event_context(event) @@ -1692,7 +1692,7 @@ class FederationEventHandler: async def _run_push_actions_and_persist_event( self, event: EventBase, context: EventContext, backfilled: bool = False - ): + ) -> None: """Run the push actions for a received event, and persist it. Args: |