aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2021-11-02 18:41:02 -0700
committerBryan Newbold <bnewbold@robocracy.org>2021-11-02 18:41:02 -0700
commit3da07382d682a0c474ddc79f748a50ad2cc758cd (patch)
treee7193fc7bb5a57f010a972a665243dc811eb5f43
parent6c7274e8b8d87a82ba25e88396e345c5711bdcd6 (diff)
downloadfatcat-3da07382d682a0c474ddc79f748a50ad2cc758cd.tar.gz
fatcat-3da07382d682a0c474ddc79f748a50ad2cc758cd.zip
web: annotate 'app' as 'Any', and document why
-rw-r--r--python/fatcat_web/__init__.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/python/fatcat_web/__init__.py b/python/fatcat_web/__init__.py
index c0d0e0c8..4c08649e 100644
--- a/python/fatcat_web/__init__.py
+++ b/python/fatcat_web/__init__.py
@@ -1,4 +1,5 @@
import sys
+from typing import Any
import elasticsearch
import fatcat_openapi_client
@@ -17,7 +18,10 @@ from raven.contrib.flask import Sentry
from fatcat_web.web_config import Config
toolbar = DebugToolbarExtension()
-app = Flask(__name__, static_url_path="/static")
+
+# TODO: annotating Flask object as Any because we insert fields (like log,
+# csrf). Should refactor to make this separate globals and not inject them
+app: Any = Flask(__name__, static_url_path="/static")
app.config.from_object(Config)
toolbar = DebugToolbarExtension(app)
FlaskUUID(app)