Files
kadence/backend/pyproject.toml
T
timka123andClaude Opus 5 ec7eedbc66 style: say which lint rules this repo keeps, then keep them
`[tool.ruff]` set a line length and a target version and nothing else, so which
rules ran depended on the installed ruff's defaults — fine while nobody ran it,
not fine for a CI job that can turn a push red because a tool changed its mind.

The set is named explicitly (E, F, I, UP, SIM, B, RUF) with three ignores that
are each a real decision rather than a shrug: B008, because FastAPI's whole
dependency idiom is a call in a default argument; E501, because wrapping prose
is a formatter's business; and RUF001, because the reports and the bot speak
Russian and "ambiguous character" is the wrong complaint about a string the
user is meant to read.

The 73 findings that remained are fixed — mostly `datetime.timezone.utc` →
`datetime.UTC`, `typing.Callable` → `collections.abc.Callable`, import order,
and unused `noqa` markers — plus seven by hand: `contextlib.suppress` for two
try/except/pass pairs, unpacking instead of list concatenation, one negated
return.

`ruff format` is deliberately *not* adopted: it would reformat 51 files, and
some of the layout here is hand-set (the comment tables, the DNS wire-format
structs) in ways a formatter flattens.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-10-22 17:28:57 +03:00

58 lines
1.7 KiB
TOML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
[project]
name = "kadence-backend"
version = "0.1.0"
description = "Pomodoro timer, todo aggregation, website/app blocking and daily Telegram reports."
readme = "../README.md"
requires-python = ">=3.12"
dependencies = [
"fastapi>=0.115",
"uvicorn[standard]>=0.30",
"sqlalchemy>=2.0",
"psycopg[binary]>=3.2",
"pydantic>=2.8",
"pydantic-settings>=2.4",
"httpx>=0.27",
"beautifulsoup4>=4.12",
"apscheduler>=3.10,<4",
"python-dotenv>=1.0",
"tzdata>=2024.1",
]
[project.optional-dependencies]
dev = ["pytest>=8.0", "ruff>=0.6"]
[project.scripts]
kadence = "app.cli:main"
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.hatch.build.targets.wheel]
packages = ["app"]
[tool.ruff]
line-length = 90
target-version = "py312"
# Named rather than left to whatever the installed ruff defaults to, because CI
# runs this and a silent default change should not turn a push red. `format` is
# deliberately not enforced: the layout here is hand-set in places (comment
# tables, the DNS wire-format structs) and a formatter would flatten it.
[tool.ruff.lint]
select = ["E", "F", "I", "UP", "SIM", "B", "RUF"]
ignore = [
# FastAPI's whole dependency idiom is a call in a default argument.
"B008",
# A line-length cap on comments and docstrings is for a formatter to decide.
"E501",
# The reports and the bot speak Russian as well as English, and the typography
# is deliberate (× for counts, – in the laundry source's labels). "Ambiguous
# character" is the wrong complaint about a string the user is meant to read.
"RUF001",
]
[tool.pytest.ini_options]
pythonpath = ["."]
testpaths = ["tests"]