mirror of
https://gitlab.ub.uni-bielefeld.de/sfb1288inf/nopaque.git
synced 2025-10-14 02:31:58 +00:00
modernize type hinting
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
from flask import abort, request
|
||||
from flask_login import current_user
|
||||
from functools import wraps
|
||||
from typing import List, Union
|
||||
from typing import Optional
|
||||
from werkzeug.exceptions import NotAcceptable
|
||||
from app.models import Permission
|
||||
|
||||
@@ -46,8 +46,8 @@ def socketio_admin_required(f):
|
||||
|
||||
|
||||
def content_negotiation(
|
||||
produces: Union[str, List[str], None] = None,
|
||||
consumes: Union[str, List[str], None] = None
|
||||
produces: Optional[str | list[str]] = None,
|
||||
consumes: Optional[str | list[str]] = None
|
||||
):
|
||||
def decorator(f):
|
||||
@wraps(f)
|
||||
|
Reference in New Issue
Block a user