summary refs log tree commit diff
path: root/synapse/config
diff options
context:
space:
mode:
authorPatrick Cloke <clokep@users.noreply.github.com>2021-03-09 07:41:32 -0500
committerGitHub <noreply@github.com>2021-03-09 07:41:32 -0500
commit7fdc6cefb3017f3c4bbe1d824e1de249ac29d219 (patch)
treeeb7529b1b438b4cbff3c5ca6d30391f1bfd10a49 /synapse/config
parentHandle image transparency better when thumbnailing. (#9473) (diff)
downloadsynapse-7fdc6cefb3017f3c4bbe1d824e1de249ac29d219.tar.xz
Fix additional type hints. (#9543)
Type hint fixes due to Twisted 21.2.0 adding type hints.
Diffstat (limited to 'synapse/config')
-rw-r--r--synapse/config/logger.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/synapse/config/logger.py b/synapse/config/logger.py
index e56cf846f5..999aecce5c 100644
--- a/synapse/config/logger.py
+++ b/synapse/config/logger.py
@@ -21,8 +21,10 @@ import threading
 from string import Template
 
 import yaml
+from zope.interface import implementer
 
 from twisted.logger import (
+    ILogObserver,
     LogBeginner,
     STDLibLogObserver,
     eventAsText,
@@ -227,7 +229,8 @@ def _setup_stdlib_logging(config, log_config_path, logBeginner: LogBeginner) ->
 
     threadlocal = threading.local()
 
-    def _log(event):
+    @implementer(ILogObserver)
+    def _log(event: dict) -> None:
         if "log_text" in event:
             if event["log_text"].startswith("DNSDatagramProtocol starting on "):
                 return