From b41b0512f9e8df7eb67e41b8f0821d93e033e1eb Mon Sep 17 00:00:00 2001 From: Andrew Morgan Date: Fri, 21 Aug 2020 17:18:42 +0100 Subject: typing --- synapse/rest/client/v2_alpha/account.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/synapse/rest/client/v2_alpha/account.py b/synapse/rest/client/v2_alpha/account.py index a3dd011788..ab771db408 100644 --- a/synapse/rest/client/v2_alpha/account.py +++ b/synapse/rest/client/v2_alpha/account.py @@ -16,6 +16,7 @@ # limitations under the License. import logging from http import HTTPStatus +from typing import TYPE_CHECKING from synapse.api.constants import LoginType from synapse.api.errors import ( @@ -37,6 +38,9 @@ from synapse.util.msisdn import phone_number_to_msisdn from synapse.util.stringutils import assert_valid_client_secret, random_string from synapse.util.threepids import canonicalise_email, check_3pid_allowed +if TYPE_CHECKING: + from synapse.server import HomeServer + from ._base import client_patterns, interactive_auth_handler logger = logging.getLogger(__name__) @@ -204,10 +208,10 @@ class PasswordResetConfirmationSubmitTokenServlet(RestServlet): "/password_reset/email/submit_token_confirm$", releases=(), unstable=True, ) - def __init__(self, hs): + def __init__(self, hs: "HomeServer"): """ Args: - hs (synapse.server.HomeServer): server + hs: server """ super(PasswordResetConfirmationSubmitTokenServlet, self).__init__() self.auth = hs.get_auth() -- cgit 1.4.1