Skip to content

Commit e6d0e94

Browse files
committed
coding: declare router mapping as sequence in the first place
Signed-off-by: MichaIng <micha@dietpi.com>
1 parent 8fcaf18 commit e6d0e94

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

motioneye/server.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
import signal
2424
import sys
2525
import time
26-
from typing import Any, Sequence, cast
26+
from typing import Callable, Sequence, Tuple
2727

2828
from tornado.ioloop import IOLoop
2929
from tornado.web import Application
@@ -182,7 +182,7 @@ def _log_request(handler):
182182
)
183183

184184

185-
handler_mapping = [
185+
handler_mapping: Sequence[Tuple[str, Callable, dict | None]] = [
186186
(r'^/$', MainHandler),
187187
(r'^/manifest.json$', ManifestHandler),
188188
(r'^/config/main/(?P<op>set|get)/?$', ConfigHandler),
@@ -406,7 +406,7 @@ def parse_options(parser, args):
406406

407407
def make_app(debug: bool = False) -> Application:
408408
return Application(
409-
cast(Sequence[Any], handler_mapping),
409+
handler_mapping,
410410
debug=debug,
411411
log_function=_log_request,
412412
static_path=settings.STATIC_PATH,

0 commit comments

Comments
 (0)