Add missing type hints to synapse.app. (#11287)

This commit is contained in:
Patrick Cloke 2021-11-10 15:06:54 -05:00 committed by GitHub
parent 66c4b774fd
commit 5cace20bf1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
17 changed files with 223 additions and 190 deletions

View file

@ -3,7 +3,7 @@ import time
from logging import Handler, LogRecord
from logging.handlers import MemoryHandler
from threading import Thread
from typing import Optional
from typing import Optional, cast
from twisted.internet.interfaces import IReactorCore
@ -56,7 +56,7 @@ class PeriodicallyFlushingMemoryHandler(MemoryHandler):
if reactor is None:
from twisted.internet import reactor as global_reactor
reactor_to_use = global_reactor # type: ignore[assignment]
reactor_to_use = cast(IReactorCore, global_reactor)
else:
reactor_to_use = reactor