summary refs log tree commit diff
path: root/synapse/rest/client/v1/room.py
diff options
context:
space:
mode:
authorPatrick Cloke <clokep@users.noreply.github.com>2020-11-17 09:09:40 -0500
committerGitHub <noreply@github.com>2020-11-17 09:09:40 -0500
commit473dfec1e56cd4115886ad273dba5594ae02ea8a (patch)
tree5b3c1257bc2105cb2119074aa5b3e1d699fc6b9a /synapse/rest/client/v1/room.py
parentAdd admin API for logging in as a user (#8617) (diff)
downloadsynapse-473dfec1e56cd4115886ad273dba5594ae02ea8a.tar.xz
Use TYPE_CHECKING instead of magic MYPY variable. (#8770)
Diffstat (limited to 'synapse/rest/client/v1/room.py')
-rw-r--r--synapse/rest/client/v1/room.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/synapse/rest/client/v1/room.py b/synapse/rest/client/v1/room.py
index 25d3cc6148..93c06afe27 100644
--- a/synapse/rest/client/v1/room.py
+++ b/synapse/rest/client/v1/room.py
@@ -18,7 +18,7 @@
 
 import logging
 import re
-from typing import List, Optional
+from typing import TYPE_CHECKING, List, Optional
 from urllib import parse as urlparse
 
 from synapse.api.constants import EventTypes, Membership
@@ -48,8 +48,7 @@ from synapse.types import RoomAlias, RoomID, StreamToken, ThirdPartyInstanceID,
 from synapse.util import json_decoder
 from synapse.util.stringutils import random_string
 
-MYPY = False
-if MYPY:
+if TYPE_CHECKING:
     import synapse.server
 
 logger = logging.getLogger(__name__)