From b6f9cc2370696eb89b8d057d336ca526126830d2 Mon Sep 17 00:00:00 2001 From: pyr0ball Date: Fri, 26 Jun 2026 20:46:56 -0700 Subject: [PATCH] ci: add pyproject.toml with ruff config (exclude app/, suppress test noise) --- pyproject.toml | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 pyproject.toml diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..d3f3a21 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,32 @@ +[tool.ruff] +# app/ is the deprecated Streamlit UI (replaced by Vue+FastAPI). +# No new work goes there; exclude from linting rather than accumulate suppressions. +exclude = ["app/"] + +[tool.ruff.lint.per-file-ignores] +# dev-api.py / dev_api.py (symlink): E702 semicolons in compact Pydantic model +# definitions — intentional style for dense data models with many simple fields. +"dev-api.py" = ["E702"] +"dev_api.py" = ["E702"] + +# finetune_local.py: E402 ML libs (torch, datasets, trl) are imported after +# runtime CUDA / Unsloth availability checks — conditional import pattern. +"scripts/finetune_local.py" = ["E402", "E741"] + +# scripts/: E402 mid-file imports used for lazy loading or post-env-setup imports. +"scripts/task_runner.py" = ["E402"] +"scripts/migrate.py" = ["E741"] + +# scrapers/: third-party script; minimal changes policy. +"scrapers/companyScraper.py" = ["E722"] + +# tools/: deprecated label tool copy (canonical in avocet); suppress style warnings. +"tools/label_tool.py" = ["E741"] + +# tests/: F841 unused variables are the standard mock-patch capture pattern +# (e.g., `original_fn = obj.method` before monkeypatching). +# E741 ambiguous `l` names and E402 conditional imports are common in test fixtures. +# E702 compact `con.commit(); con.close()` is a common SQLite test helper idiom. +"tests/**" = ["F841", "E741", "E402", "E702"] +"tests/test_wizard_steps.py" = ["F841", "E741", "E402", "E702"] +"scripts/test_email_classify.py" = ["E402", "F841"]