From 8efdcb5e0b008403311194ff414cc9c1ce4050f5 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 19 Aug 2024 21:49:58 +0000 Subject: [PATCH 1/4] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/astral-sh/ruff-pre-commit: v0.5.6 → v0.6.1](https://github.com/astral-sh/ruff-pre-commit/compare/v0.5.6...v0.6.1) --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 6fb156b..7808194 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -11,7 +11,7 @@ repos: - id: end-of-file-fixer - id: trailing-whitespace - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.5.6 + rev: v0.6.1 hooks: - id: ruff args: [--fix, --exit-non-zero-on-fix] From 0100cf298b6a02590bad8ad20c12508a45c10495 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 19 Aug 2024 21:50:33 +0000 Subject: [PATCH 2/4] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- src/apps/plots/admin.py | 3 ++- src/apps/plots/management/commands/purge_expired_data.py | 3 ++- src/apps/plots/view_util.py | 3 ++- src/apps/plots/views.py | 3 ++- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/apps/plots/admin.py b/src/apps/plots/admin.py index cb6d290..07fab4f 100644 --- a/src/apps/plots/admin.py +++ b/src/apps/plots/admin.py @@ -1,6 +1,7 @@ -from apps.plots.models import DataRun, Instrument, PlotData from django.contrib import admin +from apps.plots.models import DataRun, Instrument, PlotData + class PlotDataAdmin(admin.ModelAdmin): readonly_fields = ("data_run",) diff --git a/src/apps/plots/management/commands/purge_expired_data.py b/src/apps/plots/management/commands/purge_expired_data.py index 982f9d9..ebdd894 100644 --- a/src/apps/plots/management/commands/purge_expired_data.py +++ b/src/apps/plots/management/commands/purge_expired_data.py @@ -1,7 +1,8 @@ -from apps.plots.models import DataRun from django.core.management.base import BaseCommand from django.utils import timezone +from apps.plots.models import DataRun + class Command(BaseCommand): help = "Delete expired runs and related plots" diff --git a/src/apps/plots/view_util.py b/src/apps/plots/view_util.py index 4872756..583bbeb 100644 --- a/src/apps/plots/view_util.py +++ b/src/apps/plots/view_util.py @@ -8,11 +8,12 @@ from datetime import datetime from typing import Optional -from apps.plots.models import DataRun, Instrument, PlotData from django.conf import settings from django.http import HttpResponse from django.utils import timezone +from apps.plots.models import DataRun, Instrument, PlotData + def generate_key(instrument, run_id): """ diff --git a/src/apps/plots/views.py b/src/apps/plots/views.py index 146294f..c7be7db 100644 --- a/src/apps/plots/views.py +++ b/src/apps/plots/views.py @@ -6,7 +6,6 @@ import logging from datetime import timedelta -from apps.plots.models import DataRun, Instrument, PlotData from django.conf import settings from django.contrib.auth import authenticate, login from django.http import HttpResponse, HttpResponseNotFound, JsonResponse @@ -15,6 +14,8 @@ from django.views.decorators.cache import cache_page from django.views.decorators.csrf import csrf_exempt +from apps.plots.models import DataRun, Instrument, PlotData + from . import view_util From e86786f1a3380982d29de53ffe60e60b3918ce84 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 19 Aug 2024 21:49:58 +0000 Subject: [PATCH 3/4] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/astral-sh/ruff-pre-commit: v0.5.6 → v0.6.1](https://github.com/astral-sh/ruff-pre-commit/compare/v0.5.6...v0.6.1) --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 6fb156b..7808194 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -11,7 +11,7 @@ repos: - id: end-of-file-fixer - id: trailing-whitespace - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.5.6 + rev: v0.6.1 hooks: - id: ruff args: [--fix, --exit-non-zero-on-fix] From a8e8ea6616f3c4aaf52b56be09472a2446837317 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 19 Aug 2024 21:50:33 +0000 Subject: [PATCH 4/4] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- src/apps/plots/admin.py | 3 ++- src/apps/plots/management/commands/purge_expired_data.py | 3 ++- src/apps/plots/view_util.py | 3 ++- src/apps/plots/views.py | 3 ++- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/apps/plots/admin.py b/src/apps/plots/admin.py index cb6d290..07fab4f 100644 --- a/src/apps/plots/admin.py +++ b/src/apps/plots/admin.py @@ -1,6 +1,7 @@ -from apps.plots.models import DataRun, Instrument, PlotData from django.contrib import admin +from apps.plots.models import DataRun, Instrument, PlotData + class PlotDataAdmin(admin.ModelAdmin): readonly_fields = ("data_run",) diff --git a/src/apps/plots/management/commands/purge_expired_data.py b/src/apps/plots/management/commands/purge_expired_data.py index 24e7e13..e2f1284 100644 --- a/src/apps/plots/management/commands/purge_expired_data.py +++ b/src/apps/plots/management/commands/purge_expired_data.py @@ -1,7 +1,8 @@ -from apps.plots.models import DataRun from django.core.management.base import BaseCommand from django.utils import timezone +from apps.plots.models import DataRun + class Command(BaseCommand): help = "Delete expired runs and related plots" diff --git a/src/apps/plots/view_util.py b/src/apps/plots/view_util.py index 4872756..583bbeb 100644 --- a/src/apps/plots/view_util.py +++ b/src/apps/plots/view_util.py @@ -8,11 +8,12 @@ from datetime import datetime from typing import Optional -from apps.plots.models import DataRun, Instrument, PlotData from django.conf import settings from django.http import HttpResponse from django.utils import timezone +from apps.plots.models import DataRun, Instrument, PlotData + def generate_key(instrument, run_id): """ diff --git a/src/apps/plots/views.py b/src/apps/plots/views.py index 146294f..c7be7db 100644 --- a/src/apps/plots/views.py +++ b/src/apps/plots/views.py @@ -6,7 +6,6 @@ import logging from datetime import timedelta -from apps.plots.models import DataRun, Instrument, PlotData from django.conf import settings from django.contrib.auth import authenticate, login from django.http import HttpResponse, HttpResponseNotFound, JsonResponse @@ -15,6 +14,8 @@ from django.views.decorators.cache import cache_page from django.views.decorators.csrf import csrf_exempt +from apps.plots.models import DataRun, Instrument, PlotData + from . import view_util