mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-08-07 00:04:13 -04:00
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.
This commit is contained in:
parent
437961744c
commit
b3590614da
35 changed files with 194 additions and 295 deletions
|
@ -99,7 +99,7 @@ class AccountValidityHandler:
|
|||
on_legacy_send_mail: Optional[ON_LEGACY_SEND_MAIL_CALLBACK] = None,
|
||||
on_legacy_renew: Optional[ON_LEGACY_RENEW_CALLBACK] = None,
|
||||
on_legacy_admin_request: Optional[ON_LEGACY_ADMIN_REQUEST] = None,
|
||||
):
|
||||
) -> None:
|
||||
"""Register callbacks from module for each hook."""
|
||||
if is_user_expired is not None:
|
||||
self._is_user_expired_callbacks.append(is_user_expired)
|
||||
|
@ -165,7 +165,7 @@ class AccountValidityHandler:
|
|||
|
||||
return False
|
||||
|
||||
async def on_user_registration(self, user_id: str):
|
||||
async def on_user_registration(self, user_id: str) -> None:
|
||||
"""Tell third-party modules about a user's registration.
|
||||
|
||||
Args:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue