mirror of
https://git.ianrenton.com/ian/spothole.git
synced 2026-06-24 05:35:10 +00:00
Fix some IDE warnings, mostly around type safety on the Python side
This commit is contained in:
@@ -19,6 +19,9 @@ from server.handlers.metrics import PrometheusMetricsHandler
|
||||
from server.handlers.pagetemplate import PageTemplateHandler
|
||||
|
||||
|
||||
_HERE = os.path.dirname(__file__ or "")
|
||||
|
||||
|
||||
class WebServer:
|
||||
"""Provides the public-facing web server."""
|
||||
|
||||
@@ -101,11 +104,11 @@ class WebServer:
|
||||
misc_routes = [
|
||||
(r"/apidocs", PageTemplateHandler, {"template_name": "apidocs", **handler_opts}),
|
||||
(r"/metrics", PrometheusMetricsHandler),
|
||||
(r"/(.*)", StaticFileHandler, {"path": os.path.join(os.path.dirname(__file__), "../webassets")})
|
||||
(r"/(.*)", StaticFileHandler, {"path": os.path.join(_HERE, "../webassets")})
|
||||
]
|
||||
|
||||
app = tornado.web.Application(api_routes + ui_routes + misc_routes,
|
||||
template_path=os.path.join(os.path.dirname(__file__), "../templates"),
|
||||
template_path=os.path.join(_HERE, "../templates"),
|
||||
debug=False)
|
||||
app.listen(self._port)
|
||||
logging.info("Web server running on port " + str(WEB_SERVER_PORT))
|
||||
|
||||
Reference in New Issue
Block a user