mirror of
https://github.com/jamiepine/voicebox.git
synced 2026-09-15 04:40:40 -07:00
move pyproject
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
# Python Style Guide
|
||||
|
||||
Target: **Python 3.12+** | Formatter/Linter: **Ruff** | Config: `pyproject.toml` (project root)
|
||||
Target: **Python 3.12+** | Formatter/Linter: **Ruff** | Config: `backend/pyproject.toml`
|
||||
|
||||
This guide codifies the conventions used across the backend, and prescribes the target style for code written during the refactor (Phases 3-6). Existing code should be migrated incrementally -- don't reformat entire files in unrelated PRs.
|
||||
|
||||
|
||||
@@ -10,12 +10,12 @@ requires-python = ">=3.12"
|
||||
[tool.ruff]
|
||||
target-version = "py312"
|
||||
line-length = 120
|
||||
src = ["backend"]
|
||||
src = ["."]
|
||||
|
||||
# Files/dirs to skip entirely.
|
||||
extend-exclude = [
|
||||
"backend/voicebox-server.spec",
|
||||
"backend/build_binary.py",
|
||||
"voicebox-server.spec",
|
||||
"build_binary.py",
|
||||
]
|
||||
|
||||
[tool.ruff.lint]
|
||||
@@ -54,12 +54,12 @@ ignore = [
|
||||
# Per-file rule overrides.
|
||||
[tool.ruff.lint.per-file-ignores]
|
||||
# Tests can use assert, print, and magic values freely.
|
||||
"backend/tests/**" = ["S101", "T201", "PLR2004", "ERA001"]
|
||||
"tests/**" = ["S101", "T201", "PLR2004", "ERA001"]
|
||||
# __init__.py re-exports are expected to have unused imports.
|
||||
"**/__init__.py" = ["F401"]
|
||||
# Entry points and scripts legitimately use print.
|
||||
"backend/server.py" = ["T201"]
|
||||
"backend/main.py" = ["T201"]
|
||||
"server.py" = ["T201"]
|
||||
"main.py" = ["T201"]
|
||||
|
||||
[tool.ruff.lint.isort]
|
||||
known-first-party = ["backend"]
|
||||
@@ -77,5 +77,5 @@ docstring-code-format = true
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
[tool.pytest.ini_options]
|
||||
testpaths = ["backend/tests"]
|
||||
testpaths = ["tests"]
|
||||
asyncio_mode = "auto"
|
||||
Reference in New Issue
Block a user