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>
pull/15976/head
reivilibre 2023-08-10 17:28:31 +00:00 committed by GitHub
parent efd4d06d76
commit 7f4b413690
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

1
changelog.d/16089.misc Normal file
View File

@ -0,0 +1 @@
Fix the type annotation on `run_db_interaction` in the Module API.

View File

@ -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]":