Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
Fix the type annotation on run_db_interaction in the Module API. (#…
Browse files Browse the repository at this point in the history
…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>
  • Loading branch information
reivilibre authored Aug 10, 2023
1 parent efd4d06 commit 7f4b413
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions changelog.d/16089.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix the type annotation on `run_db_interaction` in the Module API.
4 changes: 2 additions & 2 deletions synapse/module_api/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@

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
Expand Down Expand Up @@ -885,7 +885,7 @@ def invalidate_access_token(
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]":
Expand Down

0 comments on commit 7f4b413

Please sign in to comment.