diff options
author | reivilibre <oliverw@matrix.org> | 2023-08-10 17:28:31 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-10 18:28:31 +0100 |
commit | 7f4b41369049c143919d229670087df69edb9602 (patch) | |
tree | fbb23bb9c05435eb0eda85a1c2dddc56d29779df /synapse | |
parent | Clean-up presence code (#16092) (diff) | |
download | synapse-7f4b41369049c143919d229670087df69edb9602.tar.xz |
Fix the type annotation on `run_db_interaction` in the Module API. (#16089)
* Fix the method signature of `run_db_interaction` on the module API * Newsfile Signed-off-by: Olivier Wilkinson (reivilibre) <oliverw@matrix.org> --------- Signed-off-by: Olivier Wilkinson (reivilibre) <oliverw@matrix.org>
Diffstat (limited to 'synapse')
-rw-r--r-- | synapse/module_api/__init__.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/synapse/module_api/__init__.py b/synapse/module_api/__init__.py index acee1dafd3..9ad8e038ae 100644 --- a/synapse/module_api/__init__.py +++ b/synapse/module_api/__init__.py @@ -31,7 +31,7 @@ from typing import ( import attr import jinja2 -from typing_extensions import ParamSpec +from typing_extensions import Concatenate, ParamSpec from twisted.internet import defer from twisted.internet.interfaces import IDelayedCall @@ -885,7 +885,7 @@ class ModuleApi: def run_db_interaction( self, desc: str, - func: Callable[P, T], + func: Callable[Concatenate[LoggingTransaction, P], T], *args: P.args, **kwargs: P.kwargs, ) -> "defer.Deferred[T]": |