ModPilot / ruff.toml
ThejasRao's picture
Deploy ModPilot Investigation Engine
7302343
Raw
History Blame Contribute Delete
1.46 kB
# Ruff config — engine/
# Style: strict. Detail: docs/14-Engineering.md §3.1
target-version = "py311"
line-length = 100
[lint]
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"I", # isort
"B", # bugbear
"C4", # comprehensions
"UP", # pyupgrade
"ASYNC", # async patterns
"S", # security
"TID", # tidy imports
"TCH", # type-checking blocks
"RUF", # ruff-specific
"PL", # pylint subset
"SIM", # simplify
]
ignore = [
"S101", # assert in tests is fine
"PLR2004", # magic numbers — too noisy at MVP
]
[lint.flake8-tidy-imports]
ban-relative-imports = "all"
# === Layer purity — invariant I-8 ===
# engine/ must never import from devvit-app/
[lint.flake8-tidy-imports.banned-api]
"devvit_app".msg = "Layer violation: engine cannot import from devvit-app/. See docs/Specs.md §4.2."
[lint.per-file-ignores]
# Tests use literal "secrets", inline imports for monkeypatched env, and assertions.
"test_*.py" = ["S101", "S105", "S106", "PLR2004", "ASYNC", "PLC0415"]
"__init__.py" = ["F401"]
# Alembic auto-generated migration files: long lines + trailing whitespace are fine.
"alembic/versions/*.py" = ["E501", "W291", "I001"]
[lint.isort]
known-first-party = ["api", "orchestrator", "tools", "llm", "memory", "store", "observability"]
[format]
quote-style = "double"
indent-style = "space"
docstring-code-format = true