mirror of
https://0xacab.org/jvoisin/mat2-web.git
synced 2025-05-13 03:32:18 -04:00
Mypy missing types fix
This commit is contained in:
parent
73106611ec
commit
419a95fba7
4 changed files with 9 additions and 8 deletions
|
@ -2,6 +2,7 @@ import hmac
|
|||
import os
|
||||
import hashlib
|
||||
import mimetypes as mtype
|
||||
from typing import Tuple
|
||||
|
||||
from flask_restful import abort, current_app
|
||||
from libmat2 import parser_factory
|
||||
|
@ -97,7 +98,7 @@ def get_file_paths(filename, upload_folder):
|
|||
return complete_path, filepath
|
||||
|
||||
|
||||
def is_valid_api_download_file(filename: str, key: str, secret: str, upload_folder: str) -> [str, str]:
|
||||
def is_valid_api_download_file(filename: str, key: str, secret: str, upload_folder: str) -> Tuple[str, str]:
|
||||
if filename != secure_filename(filename):
|
||||
current_app.logger.error('Insecure filename %s', filename)
|
||||
abort(400, message='Insecure filename')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue