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>
This commit is contained in:
parent
efd4d06d76
commit
7f4b413690
|
@ -0,0 +1 @@
|
|||
Fix the type annotation on `run_db_interaction` in the Module API.
|
|
@ -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]":
|
||||
|
|
Loading…
Reference in New Issue