From 1ed0895e8dc0d30950b39f7a70b5d5c43da97903 Mon Sep 17 00:00:00 2001 From: Bryan Van Deusen Date: Sun, 28 Jun 2026 10:41:12 -0400 Subject: [PATCH] style(heads): fix import ordering (ruff I001) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Alphabetize HeadTrainingRun in models/__init__ + maintenance imports (H before I), and drop the inline comment that split heads.py's import block. Pure import ordering — no behavior change. (run 1601 lint) Co-Authored-By: Claude Opus 4.8 Claude-Session: https://claude.ai/code/session_01Ttrj5P7upUTueSfoJcxEqa --- backend/app/models/__init__.py | 2 +- backend/app/services/ml/heads.py | 2 -- backend/app/tasks/maintenance.py | 2 +- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/backend/app/models/__init__.py b/backend/app/models/__init__.py index da42323..04025ed 100644 --- a/backend/app/models/__init__.py +++ b/backend/app/models/__init__.py @@ -8,6 +8,7 @@ from .base import Base from .credential import Credential from .download_event import DownloadEvent from .external_link import ExternalLink +from .head_training_run import HeadTrainingRun from .image_prediction import ImagePrediction from .image_provenance import ImageProvenance from .image_record import ImageRecord @@ -26,7 +27,6 @@ from .series_suggestion import SeriesSuggestion from .source import Source from .subscribestar_failed_media import SubscribeStarFailedMedia from .subscribestar_seen_media import SubscribeStarSeenMedia -from .head_training_run import HeadTrainingRun from .tag import Tag, TagKind, image_tag from .tag_alias import TagAlias from .tag_allowlist import TagAllowlist diff --git a/backend/app/services/ml/heads.py b/backend/app/services/ml/heads.py index 08e649c..b0907c0 100644 --- a/backend/app/services/ml/heads.py +++ b/backend/app/services/ml/heads.py @@ -34,8 +34,6 @@ from ...models import ( TagKind, ) from ...models.tag import image_tag -# Reuse the eval's proven, identical data loaders + metric math so a production -# head's quality matches what the eval reported for the same concept. from .tag_eval import ( _auto_apply_point, _ids_with_tag, diff --git a/backend/app/tasks/maintenance.py b/backend/app/tasks/maintenance.py index f4c878f..fa0397b 100644 --- a/backend/app/tasks/maintenance.py +++ b/backend/app/tasks/maintenance.py @@ -13,11 +13,11 @@ from ..celery_app import celery from ..models import ( BackupRun, DownloadEvent, + HeadTrainingRun, ImageRecord, ImportBatch, ImportSettings, ImportTask, - HeadTrainingRun, LibraryAuditRun, Source, TagEvalRun,