diff options
author | Patrick Cloke <clokep@users.noreply.github.com> | 2020-11-17 09:09:40 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-17 09:09:40 -0500 |
commit | 473dfec1e56cd4115886ad273dba5594ae02ea8a (patch) | |
tree | 5b3c1257bc2105cb2119074aa5b3e1d699fc6b9a /synapse/rest | |
parent | Add admin API for logging in as a user (#8617) (diff) | |
download | synapse-473dfec1e56cd4115886ad273dba5594ae02ea8a.tar.xz |
Use TYPE_CHECKING instead of magic MYPY variable. (#8770)
Diffstat (limited to 'synapse/rest')
-rw-r--r-- | synapse/rest/client/v1/room.py | 5 |
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__) |