Fix additional type hints. (#9543)

Type hint fixes due to Twisted 21.2.0 adding type hints.
This commit is contained in:
Patrick Cloke 2021-03-09 07:41:32 -05:00 committed by GitHub
parent 075c16b410
commit 7fdc6cefb3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 32 additions and 18 deletions

View file

@ -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