diff options
author | Sean Quah <8349537+squahtx@users.noreply.github.com> | 2021-11-17 19:07:02 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-17 19:07:02 +0000 |
commit | 84fac0f814f69645ff1ad564ef8294b31203dc95 (patch) | |
tree | 041505d9f8711a230ac6e11c707ff19017f038c0 /synapse/storage/database.py | |
parent | Add support for `/_matrix/media/v3` APIs (#11371) (diff) | |
download | synapse-84fac0f814f69645ff1ad564ef8294b31203dc95.tar.xz |
Add type annotations to `synapse.metrics` (#10847)
Diffstat (limited to 'synapse/storage/database.py')
-rw-r--r-- | synapse/storage/database.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/synapse/storage/database.py b/synapse/storage/database.py index d4cab69ebf..0693d39006 100644 --- a/synapse/storage/database.py +++ b/synapse/storage/database.py @@ -188,7 +188,7 @@ class LoggingDatabaseConnection: # The type of entry which goes on our after_callbacks and exception_callbacks lists. -_CallbackListEntry = Tuple[Callable[..., None], Iterable[Any], Dict[str, Any]] +_CallbackListEntry = Tuple[Callable[..., object], Iterable[Any], Dict[str, Any]] R = TypeVar("R") @@ -235,7 +235,7 @@ class LoggingTransaction: self.after_callbacks = after_callbacks self.exception_callbacks = exception_callbacks - def call_after(self, callback: Callable[..., None], *args: Any, **kwargs: Any): + def call_after(self, callback: Callable[..., object], *args: Any, **kwargs: Any): """Call the given callback on the main twisted thread after the transaction has finished. Used to invalidate the caches on the correct thread. @@ -247,7 +247,7 @@ class LoggingTransaction: self.after_callbacks.append((callback, args, kwargs)) def call_on_exception( - self, callback: Callable[..., None], *args: Any, **kwargs: Any + self, callback: Callable[..., object], *args: Any, **kwargs: Any ): # if self.exception_callbacks is None, that means that whatever constructed the # LoggingTransaction isn't expecting there to be any callbacks; assert that |