Update dependencies and fix deprecations
This commit is contained in:
parent
0d4fbef13d
commit
19d264a03b
8 changed files with 154 additions and 131 deletions
|
|
@ -6,11 +6,11 @@ from flask import Flask
|
|||
|
||||
from tofu_api.api import TofuApiBlueprint
|
||||
from tofu_api.common.config import Config
|
||||
from tofu_api.common.json import JSONEncoder
|
||||
from tofu_api.common.json import JSONProvider
|
||||
from tofu_api.dependencies import Dependencies
|
||||
|
||||
# Enable deprecation warnings in dev environment
|
||||
if not sys.warnoptions and os.getenv('FLASK_ENV') == 'development':
|
||||
if not sys.warnoptions and os.getenv('FLASK_DEBUG'):
|
||||
warnings.filterwarnings('default', module='tofu_api.*')
|
||||
|
||||
|
||||
|
|
@ -20,7 +20,7 @@ class App(Flask):
|
|||
"""
|
||||
# Override Flask classes
|
||||
config_class = Config
|
||||
json_encoder = JSONEncoder
|
||||
json_provider_class = JSONProvider
|
||||
|
||||
# Set type hint for config
|
||||
config: Config
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue