summary refs log tree commit diff
path: root/synapse/api/auth_blocking.py
diff options
context:
space:
mode:
authorPatrick Cloke <clokep@users.noreply.github.com>2021-04-23 12:02:16 -0400
committerGitHub <noreply@github.com>2021-04-23 12:02:16 -0400
commite83627926fb5373b383129b99a5039e8a2e329af (patch)
treec31b106b4297fdb13755dca06870816094145540 /synapse/api/auth_blocking.py
parentMake DomainSpecificString an attrs class (#9875) (diff)
downloadsynapse-e83627926fb5373b383129b99a5039e8a2e329af.tar.xz
Add type hints to auth and auth_blocking. (#9876)
Diffstat (limited to 'synapse/api/auth_blocking.py')
-rw-r--r--synapse/api/auth_blocking.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/synapse/api/auth_blocking.py b/synapse/api/auth_blocking.py
index a8df60cb89..e6bced93d5 100644
--- a/synapse/api/auth_blocking.py
+++ b/synapse/api/auth_blocking.py
@@ -13,18 +13,21 @@
 # limitations under the License.
 
 import logging
-from typing import Optional
+from typing import TYPE_CHECKING, Optional
 
 from synapse.api.constants import LimitBlockingTypes, UserTypes
 from synapse.api.errors import Codes, ResourceLimitError
 from synapse.config.server import is_threepid_reserved
 from synapse.types import Requester
 
+if TYPE_CHECKING:
+    from synapse.server import HomeServer
+
 logger = logging.getLogger(__name__)
 
 
 class AuthBlocking:
-    def __init__(self, hs):
+    def __init__(self, hs: "HomeServer"):
         self.store = hs.get_datastore()
 
         self._server_notices_mxid = hs.config.server_notices_mxid
@@ -43,7 +46,7 @@ class AuthBlocking:
         threepid: Optional[dict] = None,
         user_type: Optional[str] = None,
         requester: Optional[Requester] = None,
-    ):
+    ) -> None:
         """Checks if the user should be rejected for some external reason,
         such as monthly active user limiting or global disable flag