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

Commit

Permalink
Improve type annotations for the helper methods on a CachedFunction. (
Browse files Browse the repository at this point in the history
  • Loading branch information
reivilibre authored Dec 16, 2022
1 parent 652d166 commit 864c3f8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions changelog.d/14685.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Improve type annotations for the helper methods on a `CachedFunction`.
6 changes: 3 additions & 3 deletions synapse/util/caches/descriptors.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,9 @@


class CachedFunction(Generic[F]):
invalidate: Any = None
invalidate_all: Any = None
prefill: Any = None
invalidate: Callable[[Tuple[Any, ...]], None]
invalidate_all: Callable[[], None]
prefill: Callable[[Tuple[Any, ...], Any], None]
cache: Any = None
num_args: Any = None

Expand Down

0 comments on commit 864c3f8

Please sign in to comment.