diff options
Diffstat (limited to 'uploader')
-rw-r--r-- | uploader/input_validation.py | 2 | ||||
-rw-r--r-- | uploader/phenotypes/views.py | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/uploader/input_validation.py b/uploader/input_validation.py index 3b5d4dd..627c69e 100644 --- a/uploader/input_validation.py +++ b/uploader/input_validation.py @@ -55,7 +55,7 @@ def is_valid_representative_name(repr_name: str) -> bool: return bool(pattern.match(repr_name)) -def encode_errors(errors: tuple[tuple[str, str], ...], form) -> str: +def encode_errors(errors: tuple[tuple[str, str], ...], form) -> bytes: """Encode form errors into base64 string.""" return base64.b64encode( json.dumps({ diff --git a/uploader/phenotypes/views.py b/uploader/phenotypes/views.py index eb0b460..5f6e4a6 100644 --- a/uploader/phenotypes/views.py +++ b/uploader/phenotypes/views.py @@ -259,7 +259,7 @@ def create_dataset(species: dict, population: dict, **kwargs):# pylint: disable= request.args.get("error_values", ""))) form = request.form - _errors = tuple() + _errors: tuple[tuple[str, str], ...] = tuple() if not is_valid_representative_name( (form.get("dataset-name") or "").strip()): _errors = _errors + (("dataset-name", "Invalid dataset name."),) @@ -297,7 +297,7 @@ def create_dataset(species: dict, population: dict, **kwargs):# pylint: disable= species_redirect_uri="species.populations.phenotypes.index", population_redirect_uri="species.populations.phenotypes.select_population", redirect_uri="species.populations.phenotypes.list_datasets") -def add_phenotypes(species: dict, population: dict, dataset: dict, **kwargs): +def add_phenotypes(species: dict, population: dict, dataset: dict, **kwargs):# pylint: disable=[unused-argument, too-many-locals] """Add one or more phenotypes to the dataset.""" with (database_connection(app.config["SQL_URI"]) as conn, conn.cursor(cursorclass=DictCursor) as cursor): |