summary refs log tree commit diff
path: root/synapse/handlers/presence.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/handlers/presence.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/handlers/presence.py')
-rw-r--r--synapse/handlers/presence.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/synapse/handlers/presence.py b/synapse/handlers/presence.py
index 8e014c9bb5..22d1e9d35c 100644
--- a/synapse/handlers/presence.py
+++ b/synapse/handlers/presence.py
@@ -25,7 +25,7 @@ The methods that define policy are:
 import abc
 import logging
 from contextlib import contextmanager
-from typing import Dict, Iterable, List, Set, Tuple
+from typing import TYPE_CHECKING, Dict, Iterable, List, Set, Tuple
 
 from prometheus_client import Counter
 from typing_extensions import ContextManager
@@ -46,8 +46,7 @@ from synapse.util.caches.descriptors import cached
 from synapse.util.metrics import Measure
 from synapse.util.wheel_timer import WheelTimer
 
-MYPY = False
-if MYPY:
+if TYPE_CHECKING:
     from synapse.server import HomeServer
 
 logger = logging.getLogger(__name__)