summary refs log tree commit diff
path: root/synapse/rest/admin
diff options
context:
space:
mode:
authorPatrick Cloke <clokep@users.noreply.github.com>2021-09-03 09:22:22 -0400
committerGitHub <noreply@github.com>2021-09-03 09:22:22 -0400
commitecbfa4fe4fa7625dec14ef8f9bd06cc4ad141de0 (patch)
tree732bb7811ccffe2c68fb59fbb8351486ff786d77 /synapse/rest/admin
parentFix bug with reusing 'txn' when persisting event. (#10743) (diff)
downloadsynapse-ecbfa4fe4fa7625dec14ef8f9bd06cc4ad141de0.tar.xz
Additional type hints for client REST servlets (part 5) (#10736)
Additionally this enforce type hints on all function signatures inside
of the synapse.rest.client package.
Diffstat (limited to 'synapse/rest/admin')
-rw-r--r--synapse/rest/admin/server_notice_servlet.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/synapse/rest/admin/server_notice_servlet.py b/synapse/rest/admin/server_notice_servlet.py
index 42201afc86..f5a38c2670 100644
--- a/synapse/rest/admin/server_notice_servlet.py
+++ b/synapse/rest/admin/server_notice_servlet.py
@@ -11,7 +11,7 @@
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
-from typing import TYPE_CHECKING, Optional, Tuple
+from typing import TYPE_CHECKING, Awaitable, Optional, Tuple
 
 from synapse.api.constants import EventTypes
 from synapse.api.errors import NotFoundError, SynapseError
@@ -101,7 +101,9 @@ class SendServerNoticeServlet(RestServlet):
 
         return 200, {"event_id": event.event_id}
 
-    def on_PUT(self, request: SynapseRequest, txn_id: str) -> Tuple[int, JsonDict]:
+    def on_PUT(
+        self, request: SynapseRequest, txn_id: str
+    ) -> Awaitable[Tuple[int, JsonDict]]:
         return self.txns.fetch_or_execute_request(
             request, self.on_POST, request, txn_id
         )