Skip to content
This repository was archived by the owner on Mar 26, 2024. It is now read-only.

Commit 04c8f28

Browse files
committed
Fix typing import circular dependency
1 parent 8955c76 commit 04c8f28

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

synapse/util/caches/descriptors.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
import inspect
1818
import logging
1919
from typing import (
20+
TYPE_CHECKING,
2021
Any,
2122
Awaitable,
2223
Callable,
@@ -40,13 +41,15 @@
4041
from twisted.python.failure import Failure
4142

4243
from synapse.logging.context import make_deferred_yieldable, preserve_fn
43-
from synapse.replication.tcp.external_sharded_cache import ExternalShardedCache
4444
from synapse.util import unwrapFirstError
4545
from synapse.util.async_helpers import delay_cancellation
4646
from synapse.util.caches.deferred_cache import DeferredCache
4747
from synapse.util.caches.lrucache import LruCache
4848
from synapse.util.caches.redis_caches import redisCachedList
4949

50+
if TYPE_CHECKING:
51+
from synapse.replication.tcp.external_sharded_cache import ExternalShardedCache
52+
5053
logger = logging.getLogger(__name__)
5154

5255
CacheKey = Union[Tuple, Any]

0 commit comments

Comments
 (0)