diff options
author | Patrick Cloke <clokep@users.noreply.github.com> | 2020-10-09 07:20:51 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-09 07:20:51 -0400 |
commit | a93f3121f8fd1c2b77e003d8e43ce881635bb098 (patch) | |
tree | 2abb73eb4b3fe2334ab5b2c162c1224189740959 /synapse/handlers/deactivate_account.py | |
parent | Invalidate the cache when an olm fallback key is uploaded (#8501) (diff) | |
download | synapse-a93f3121f8fd1c2b77e003d8e43ce881635bb098.tar.xz |
Add type hints to some handlers (#8505)
Diffstat (limited to 'synapse/handlers/deactivate_account.py')
-rw-r--r-- | synapse/handlers/deactivate_account.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/synapse/handlers/deactivate_account.py b/synapse/handlers/deactivate_account.py index 0635ad5708..72a5831531 100644 --- a/synapse/handlers/deactivate_account.py +++ b/synapse/handlers/deactivate_account.py @@ -14,7 +14,7 @@ # See the License for the specific language governing permissions and # limitations under the License. import logging -from typing import Optional +from typing import TYPE_CHECKING, Optional from synapse.api.errors import SynapseError from synapse.metrics.background_process_metrics import run_as_background_process @@ -22,13 +22,16 @@ from synapse.types import UserID, create_requester from ._base import BaseHandler +if TYPE_CHECKING: + from synapse.app.homeserver import HomeServer + logger = logging.getLogger(__name__) class DeactivateAccountHandler(BaseHandler): """Handler which deals with deactivating user accounts.""" - def __init__(self, hs): + def __init__(self, hs: "HomeServer"): super().__init__(hs) self.hs = hs self._auth_handler = hs.get_auth_handler() @@ -137,7 +140,7 @@ class DeactivateAccountHandler(BaseHandler): return identity_server_supports_unbinding - async def _reject_pending_invites_for_user(self, user_id: str): + async def _reject_pending_invites_for_user(self, user_id: str) -> None: """Reject pending invites addressed to a given user ID. Args: |