mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-05 15:35:06 -04:00
Fix additional type hints. (#9543)
Type hint fixes due to Twisted 21.2.0 adding type hints.
This commit is contained in:
parent
075c16b410
commit
7fdc6cefb3
9 changed files with 32 additions and 18 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue