0
0
Fork 1
mirror of https://mau.dev/maunium/synapse.git synced 2024-12-14 20:33:53 +01:00

Improve type annotations for the helper methods on a CachedFunction. (#14685)

This commit is contained in:
reivilibre 2022-12-16 13:04:54 +00:00 committed by GitHub
parent 652d1669c5
commit 864c3f85b0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 3 deletions

1
changelog.d/14685.misc Normal file
View file

@ -0,0 +1 @@
Improve type annotations for the helper methods on a `CachedFunction`.

View file

@ -53,9 +53,9 @@ F = TypeVar("F", bound=Callable[..., Any])
class CachedFunction(Generic[F]): class CachedFunction(Generic[F]):
invalidate: Any = None invalidate: Callable[[Tuple[Any, ...]], None]
invalidate_all: Any = None invalidate_all: Callable[[], None]
prefill: Any = None prefill: Callable[[Tuple[Any, ...], Any], None]
cache: Any = None cache: Any = None
num_args: Any = None num_args: Any = None