Skip to content

Commit

Permalink
Merge pull request #27 from neutrons/pre-commit-ci-update-config
Browse files Browse the repository at this point in the history
[pre-commit.ci] pre-commit autoupdate
  • Loading branch information
glass-ships authored Aug 23, 2024
2 parents 231c97a + 95e1348 commit 16a4f7d
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
3 changes: 2 additions & 1 deletion src/apps/plots/admin.py
Original file line number Diff line number Diff line change
@@ -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",)
Expand Down
3 changes: 2 additions & 1 deletion src/apps/plots/management/commands/purge_expired_data.py
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
3 changes: 2 additions & 1 deletion src/apps/plots/view_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
"""
Expand Down
3 changes: 2 additions & 1 deletion src/apps/plots/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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


Expand Down

0 comments on commit 16a4f7d

Please sign in to comment.