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

Commit 864c3f8

Browse files
authored
Improve type annotations for the helper methods on a CachedFunction. (#14685)
1 parent 652d166 commit 864c3f8

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

changelog.d/14685.misc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Improve type annotations for the helper methods on a `CachedFunction`.

synapse/util/caches/descriptors.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,9 @@
5353

5454

5555
class CachedFunction(Generic[F]):
56-
invalidate: Any = None
57-
invalidate_all: Any = None
58-
prefill: Any = None
56+
invalidate: Callable[[Tuple[Any, ...]], None]
57+
invalidate_all: Callable[[], None]
58+
prefill: Callable[[Tuple[Any, ...], Any], None]
5959
cache: Any = None
6060
num_args: Any = None
6161

0 commit comments

Comments
 (0)