From 3da07382d682a0c474ddc79f748a50ad2cc758cd Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Tue, 2 Nov 2021 18:41:02 -0700 Subject: web: annotate 'app' as 'Any', and document why --- python/fatcat_web/__init__.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'python/fatcat_web') 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) -- cgit v1.2.3