mirror of
https://gitlab.ub.uni-bielefeld.de/sfb1288inf/nopaque.git
synced 2025-07-01 10:20:34 +00:00
modernize type hinting
This commit is contained in:
12
wsgi.py
12
wsgi.py
@ -4,17 +4,16 @@ import eventlet
|
||||
eventlet.monkey_patch()
|
||||
|
||||
|
||||
from flask import Flask # noqa
|
||||
from typing import Any, Dict # noqa
|
||||
from typing import Any # noqa
|
||||
from app import create_app, db, scheduler, socketio # noqa
|
||||
from app import models # noqa
|
||||
|
||||
|
||||
app: Flask = create_app()
|
||||
app = create_app()
|
||||
|
||||
|
||||
@app.shell_context_processor
|
||||
def make_shell_context() -> Dict[str, Any]:
|
||||
def make_shell_context() -> dict[str, Any]:
|
||||
''' Adds variables to the shell context. '''
|
||||
return {
|
||||
'db': db,
|
||||
@ -34,9 +33,8 @@ def make_shell_context() -> Dict[str, Any]:
|
||||
|
||||
|
||||
def main():
|
||||
if app.config['NOPAQUE_IS_PRIMARY_INSTANCE']:
|
||||
with app.app_context():
|
||||
scheduler.start()
|
||||
with app.app_context():
|
||||
scheduler.start()
|
||||
socketio.run(app, host='0.0.0.0')
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user