diff --git a/thunorweb/apps.py b/thunorweb/apps.py index e4bf659a..850ce1cf 100644 --- a/thunorweb/apps.py +++ b/thunorweb/apps.py @@ -3,7 +3,7 @@ from django.apps import AppConfig from django.conf import settings from django.db.models.signals import post_save -from django.db.utils import ProgrammingError, OperationalError, DatabaseError +from django.db.utils import ProgrammingError, OperationalError class ThunorConfig(AppConfig): diff --git a/thunorweb/tasks.py b/thunorweb/tasks.py index 23d5f621..0d56a27f 100644 --- a/thunorweb/tasks.py +++ b/thunorweb/tasks.py @@ -431,7 +431,7 @@ def _dataset_groupings(dataset, regenerate_cache=False): missing_combos = [] for cl in cell_line_ids: for dr in drug_ids: - if not (cl, dr) in combos: + if (cl, dr) not in combos: missing_combos.append((str(cl), (str(dr), ))) if has_drug_combos: diff --git a/thunorweb/views/dataset_downloads.py b/thunorweb/views/dataset_downloads.py index 87b42ecb..56bcde16 100644 --- a/thunorweb/views/dataset_downloads.py +++ b/thunorweb/views/dataset_downloads.py @@ -11,7 +11,7 @@ from django.conf import settings import os from thunorweb.serve_file import serve_file -from thunorweb.views.datasets import license_accepted, LICENSE_UNSIGNED +from thunorweb.views.datasets import license_accepted from django.views.decorators.clickjacking import xframe_options_sameorigin from thunorweb.views import login_required_unless_public, _assert_has_perm diff --git a/thunorweb/views/plate_mapper.py b/thunorweb/views/plate_mapper.py index 2fcf04da..33b37c8f 100644 --- a/thunorweb/views/plate_mapper.py +++ b/thunorweb/views/plate_mapper.py @@ -192,7 +192,7 @@ def ajax_save_plate(request): wells_to_insert = [] for plate in plate_ids: for well_num, cell_line_id in enumerate(cell_line_ids): - if not (plate, well_num) in existing_wells: + if (plate, well_num) not in existing_wells: wells_to_insert.append(Well( well_num=well_num, plate_id=plate, diff --git a/thunorweb/views/plots.py b/thunorweb/views/plots.py index 11a166a1..211dad99 100644 --- a/thunorweb/views/plots.py +++ b/thunorweb/views/plots.py @@ -1,5 +1,5 @@ from django.shortcuts import render, Http404 -from django.http import JsonResponse, HttpResponse +from django.http import HttpResponse from django.utils.html import strip_tags from django.views.decorators.csrf import ensure_csrf_cookie from django.core.cache import cache diff --git a/thunorweb/views/tags.py b/thunorweb/views/tags.py index 2686fa94..0781f85c 100644 --- a/thunorweb/views/tags.py +++ b/thunorweb/views/tags.py @@ -3,7 +3,7 @@ from django.db import transaction from django.db.models import Q from thunorweb.models import CellLine, Drug, CellLineTag, DrugTag -from thunorweb.views import login_required_unless_public, login_required +from thunorweb.views import login_required_unless_public import logging import pandas as pd from django.db.utils import IntegrityError