Files
rengine/pyproject.toml
T
Yogesh OjhaandClaude Sonnet 5 1b44da479f refactor(redis): one connection per process, shared across packages
mcp/, toolbox/ and the api's rate limiter each held their own lazy
Redis client, three copies of the same lru-singleton pattern reaching
into api.core.ratelimit from worker-side code that has no FastAPI app.
shared/redis.py is the one place that builds the async and sync
clients; ratelimit, throttle, mcp/limits and toolbox/store now import
from it. pyproject.toml's isort first-party list gains the packages
that have shipped since it was last written (channels, connectors,
interest, mcp, reports, stages, toolbox).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VckaDx6mBB4TsG76u61gvv
2026-09-16 08:03:19 +05:30

109 lines
2.6 KiB
TOML

[tool.ruff]
target-version = "py313"
line-length = 88
exclude = [
".git",
".venv",
"__pycache__",
"*.pyc",
".pytest_cache",
".ruff_cache",
]
[tool.ruff.lint]
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"I", # isort
"N", # pep8-naming
"UP", # pyupgrade
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"DTZ", # flake8-datetimez
"T10", # flake8-debugger
"EM", # flake8-errmsg
"ISC", # flake8-implicit-str-concat
"ICN", # flake8-import-conventions
"PIE", # flake8-pie
"T20", # flake8-print
"PT", # flake8-pytest-style
"Q", # flake8-quotes
"RET", # flake8-return
"SIM", # flake8-simplify
"ARG", # flake8-unused-arguments
"PTH", # flake8-use-pathlib
"ERA", # eradicate (commented-out code)
"PL", # pylint
"RUF", # ruff-specific rules
"ASYNC", # flake8-async
"S", # flake8-bandit (security)
]
ignore = [
"E501", # line too long (handled by formatter)
"PLR0913", # too many arguments in function
"PT019", # fixture without value (false positive on FastAPI deps)
]
[tool.ruff.lint.pylint]
max-branches = 15
[tool.ruff.lint.isort]
known-first-party = [
"app",
"channels",
"connectors",
"interest",
"mcp",
"reports",
"shared",
"stages",
"tools",
"toolbox",
"worker",
]
section-order = [
"future",
"standard-library",
"third-party",
"first-party",
"local-folder"
]
[tool.ruff.lint.per-file-ignores]
"__init__.py" = ["F401", "F403"]
"scripts/*.py" = ["T201"] # maintenance CLIs: stdout is their interface
"tests/**/*.py" = ["S101", "S105", "S106", "PLR2004", "ARG001", "PLR0915"] # asserts, literal expectations, fixture args
[tool.ruff.lint.pydocstyle]
convention = "google"
[tool.ruff.format]
quote-style = "double"
indent-style = "space"
skip-magic-trailing-comma = false
line-ending = "auto"
[dependency-groups]
dev = [
"ruff==0.14.14",
]
[tool.pytest.ini_options]
testpaths = ["tests"]
asyncio_mode = "auto"
asyncio_default_fixture_loop_scope = "session"
asyncio_default_test_loop_scope = "session"
addopts = "-q --strict-markers --strict-config"
markers = [
"grammar: invariants of the asset query language",
"pipeline: scan orchestration and stage behaviour",
"api: exercised through the HTTP surface",
"hygiene: hardening checks read off stored responses",
"posture: sender, mail and zone checks read from DNS",
"channels: remote control over a chat channel",
]