1- import os
21import logging
3- from typing import List , Dict
4-
5- from flask import Flask , Blueprint , current_app , send_from_directory
6- from flask_cors import CORS
2+ import os
3+ from typing import Dict , List
74
85import aw_datastore
96from aw_datastore import Datastore
10- from .custom_static import get_custom_static_blueprint
7+ from flask import (
8+ Blueprint ,
9+ Flask ,
10+ current_app ,
11+ send_from_directory ,
12+ )
13+ from flask_cors import CORS
1114
12- from .log import FlaskLogHandler
13- from .api import ServerAPI
1415from . import rest
16+ from .api import ServerAPI
17+ from .custom_static import get_custom_static_blueprint
18+ from .log import FlaskLogHandler
1519
1620logger = logging .getLogger (__name__ )
1721
@@ -26,7 +30,7 @@ def __init__(self, name, *args, **kwargs):
2630 Flask .__init__ (self , name , * args , ** kwargs )
2731
2832 # Is set on later initialization
29- self .api = None # type: ServerAPI
33+ self .api : ServerAPI = None # type: ignore
3034
3135
3236def create_app (
@@ -76,9 +80,8 @@ def static_js(path):
7680def _config_cors (cors_origins : List [str ], testing : bool ):
7781 if cors_origins :
7882 logger .warning (
79- "Running with additional allowed CORS origins specified through config or CLI argument (could be a security risk): {}" .format (
80- cors_origins
81- )
83+ "Running with additional allowed CORS origins specified through config "
84+ "or CLI argument (could be a security risk): {}" .format (cors_origins )
8285 )
8386
8487 if testing :
0 commit comments