From 1f8b40865906c9a24b73a31a3f8443aaa7040de9 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 3 Jul 2023 16:30:37 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- app/core/tests/models/test_predictions.py | 1 - app/core/tests/test_admin.py | 1 - app/core/tests/test_filecache.py | 1 - app/core/tests/views/test_submission_views.py | 2 -- app/core/views/root.py | 1 - app/referee/tasks.py | 2 -- app/referee/tests/test_tasks.py | 1 - 7 files changed, 9 deletions(-) diff --git a/app/core/tests/models/test_predictions.py b/app/core/tests/models/test_predictions.py index a65d43ac..30023d79 100644 --- a/app/core/tests/models/test_predictions.py +++ b/app/core/tests/models/test_predictions.py @@ -123,7 +123,6 @@ def mock_save_side_effect(name, content, **kwargs): with patch( "django.db.models.fields.files.FieldFile.save", mock_field_file_save ): - models.Prediction.load_evaluation_output( challenge, evaluation, coordsfile_type, output_path ) diff --git a/app/core/tests/test_admin.py b/app/core/tests/test_admin.py index d18de61e..f4a1b2f9 100644 --- a/app/core/tests/test_admin.py +++ b/app/core/tests/test_admin.py @@ -22,7 +22,6 @@ def c(staff_user): def test_challenge_admin(molfile_molw_config, c): - response = c.get( f"/admin/core/challenge/{molfile_molw_config.challenge.id}/change/" ) diff --git a/app/core/tests/test_filecache.py b/app/core/tests/test_filecache.py index a0d6fab0..bffb92a0 100644 --- a/app/core/tests/test_filecache.py +++ b/app/core/tests/test_filecache.py @@ -10,7 +10,6 @@ @pytest.mark.parametrize(["remote_storage"], [[False], [True]]) def test_delete_local_copy(challenge, benzene_from_mol, settings, remote_storage): - filename = "Conformer3D_CID_241.mdl" output_path = TEST_DATA_PATH / filename file_value = models.FileValue.from_string( diff --git a/app/core/tests/views/test_submission_views.py b/app/core/tests/views/test_submission_views.py index 2985cede..171c5a45 100644 --- a/app/core/tests/views/test_submission_views.py +++ b/app/core/tests/views/test_submission_views.py @@ -167,7 +167,6 @@ def test_load_expired_submission(client, user, draft_submission): @patch("django.utils.timezone.now", mocktime.inactive_after) @pytest.mark.django_db def test_update_expired_submission(client, user, draft_submission): - client.force_login(user) response = client.get(f"/submission/{draft_submission.pk}/edit/") assert response.status_code == 200 @@ -241,7 +240,6 @@ def test_update_expired_submission(client, user, draft_submission): @pytest.mark.django_db(transaction=True) def test_run_submission(client, container_engine): - # Because we have dask worker in a separate thread, we need to commit our transaction. # But the transaction test case will wipe out data from django's ContentTypes # So rerun our migrations to re-add our content types diff --git a/app/core/views/root.py b/app/core/views/root.py index bab12a46..c9d3e2c2 100644 --- a/app/core/views/root.py +++ b/app/core/views/root.py @@ -2,7 +2,6 @@ class IndexView(TemplateView): - template_name = "index.html" def get_context_data(self, **kwargs): diff --git a/app/referee/tasks.py b/app/referee/tasks.py index e0112cf9..bcbc1edb 100644 --- a/app/referee/tasks.py +++ b/app/referee/tasks.py @@ -69,7 +69,6 @@ def submit_submission_run(client, submission_run): @dask.delayed(pure=False) def cache_containers(submission_run, delayed_conditional): - if not delayed_conditional: return 1 @@ -107,7 +106,6 @@ def cache_containers(submission_run, delayed_conditional): def _run(submission_run, delayed_conditional): - pull_code = cache_containers(submission_run, delayed_conditional) if submission_run.submission.challenge.current_batch_group() is None: diff --git a/app/referee/tests/test_tasks.py b/app/referee/tests/test_tasks.py index 49b3a8cd..5165190e 100644 --- a/app/referee/tests/test_tasks.py +++ b/app/referee/tests/test_tasks.py @@ -57,7 +57,6 @@ def test_run_and_score_submission(container_engine): def _run_and_check_evaluation(submission_run, evaluation): - temp_dir = pathlib.Path(tempfile.mkdtemp()) with patch("django.conf.settings.CONTAINER_FILES_ROOT", temp_dir): pull_code = tasks.cache_containers(submission_run, True)