From b1ef2c75d597bd697b508dd6b85d36a0a254e40e Mon Sep 17 00:00:00 2001 From: chetanr25 Date: Thu, 2 Jul 2026 19:51:32 +0530 Subject: [PATCH 1/3] fix: resolve lint error --- app/services/input.py | 2 +- tests/conftest.py | 1 - tests/test_deletion.py | 5 ----- tests/test_v1_input.py | 1 - tests/test_v1_voice.py | 1 - 5 files changed, 1 insertion(+), 9 deletions(-) diff --git a/app/services/input.py b/app/services/input.py index 1aa2892..bdd51c4 100644 --- a/app/services/input.py +++ b/app/services/input.py @@ -3,7 +3,7 @@ from sqlmodel import Session from app.api.schemas.enums import InputStatus, InputType -from app.core.config import AUDIO_CONTENT_TYPES, AUDIO_DIR +from app.core.config import AUDIO_DIR from app.db.repositories import create_input, create_job, update_job from app.models import Input, Job from app.tasks.transcribe import transcribe_audio_task diff --git a/tests/conftest.py b/tests/conftest.py index ab4370c..62fae51 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -14,7 +14,6 @@ from app.main import app from app.api.deps import get_db -from app.core.config import API_PREFIX # single source of truth for all tests from app.models import Template, FormSubmission, Job, Input, Extraction, Incident, Form, Report # noqa: F401 — registers tables # --------------------------------------------------------------------------- diff --git a/tests/test_deletion.py b/tests/test_deletion.py index 5c39e43..4c38ebb 100644 --- a/tests/test_deletion.py +++ b/tests/test_deletion.py @@ -2,10 +2,7 @@ POST /api/v1/forms/purge, and API-key access control. """ -import io from datetime import datetime, timedelta, timezone -from pathlib import Path -from unittest.mock import patch import pytest @@ -90,7 +87,6 @@ def test_delete_template_deletes_submission_output_pdfs(self, client, db, tmp_pa out_pdf.write_bytes(b"%PDF-1.4 filled") tpl_id = _seed_template(client, pdf_path="tpl.pdf") - sub_id = _seed_submission(db, tpl_id, output_pdf_path="filled.pdf") client.delete(f"{API_PREFIX}/templates/{tpl_id}") assert not out_pdf.exists() @@ -249,7 +245,6 @@ def test_purge_requires_key_when_set(self, client): assert resp.status_code == 401 def test_purge_with_valid_key(self, client, db): - tpl_id = _seed_template(client) resp = client.post( f"{API_PREFIX}/forms/purge?days=30", headers={"X-API-Key": "secret-test-key"}, diff --git a/tests/test_v1_input.py b/tests/test_v1_input.py index 1a00b1c..a73f048 100644 --- a/tests/test_v1_input.py +++ b/tests/test_v1_input.py @@ -4,7 +4,6 @@ Whisper involvement — text input is fully synchronous. """ -import pytest TEXT_URL = "/api/v1/input/text" INPUT_URL = "/api/v1/input" diff --git a/tests/test_v1_voice.py b/tests/test_v1_voice.py index 1ae2ab0..3c512a5 100644 --- a/tests/test_v1_voice.py +++ b/tests/test_v1_voice.py @@ -5,7 +5,6 @@ """ import io -import pytest from pathlib import Path from unittest.mock import MagicMock, patch From de775077e0cf43ad1d57e832ce7f9355642d88e5 Mon Sep 17 00:00:00 2001 From: chetanr25 Date: Thu, 2 Jul 2026 20:06:49 +0530 Subject: [PATCH 2/3] fix: include development branch in lint workflow --- .github/workflows/lint.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 97bd836..22edb61 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -2,9 +2,9 @@ name: Lint on: push: - branches: [main] + branches: [main,development] pull_request: - branches: [main] + branches: [main,development] jobs: lint: From ed4dbda396fe096c6f6bd827a15233fde697166a Mon Sep 17 00:00:00 2001 From: chetanr25 Date: Thu, 2 Jul 2026 20:21:03 +0530 Subject: [PATCH 3/3] test: fix template deletion cleanup test --- tests/test_deletion.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/test_deletion.py b/tests/test_deletion.py index 4c38ebb..0d036dc 100644 --- a/tests/test_deletion.py +++ b/tests/test_deletion.py @@ -87,6 +87,7 @@ def test_delete_template_deletes_submission_output_pdfs(self, client, db, tmp_pa out_pdf.write_bytes(b"%PDF-1.4 filled") tpl_id = _seed_template(client, pdf_path="tpl.pdf") + _seed_submission(db, tpl_id, output_pdf_path="filled.pdf") client.delete(f"{API_PREFIX}/templates/{tpl_id}") assert not out_pdf.exists()