mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-06-19 06:54:06 -04:00
Add missing type hints to synapse.app
. (#11287)
This commit is contained in:
parent
66c4b774fd
commit
5cace20bf1
17 changed files with 223 additions and 190 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue