Files
docker-volume-backup/pyproject.toml
Kevin Veen-Birkenbach efcfe88e7f style!: adopt the core lint bar and migrate to it
The package carried no ruff configuration at all, so it ran on the defaults (E4+E7+E9+F) while infinito-nexus-core, its only consumer, holds itself to a far wider selection. Measured against that selection this tree had 224 findings. It now has none.

The selector list is core's verbatim so both repositories answer to one bar. target-version stays py39 rather than core's py311, because requires-python still declares >=3.9 and pyupgrade would otherwise propose syntax the declared minimum cannot run. Every ignore carries its reason: S603/S607 in particular, since running docker and dump binaries from PATH in list form is this tool's whole job and is already injection-safe.

Two conversions are judgement rather than mechanics. os.path.join(dir, '') was the rsync idiom for a trailing separator, which Path drops, so it becomes an explicit os.sep. os.path.abspath stays where Path.resolve() would follow symlinks and let a symlinked volume test as inside the snapshot subject.

BREAKING CHANGE: VersionMismatch is renamed VersionMismatchError.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-18 01:51:18 +02:00

87 lines
2.7 KiB
TOML

[build-system]
requires = ["setuptools>=69", "wheel"]
build-backend = "setuptools.build_meta"
[project]
name = "backup-docker-to-local"
version = "4.0.0"
description = "Backup Docker volumes to local with rsync and optional DB dumps."
readme = "README.md"
requires-python = ">=3.9"
license = { text = "AGPL-3.0-or-later" }
authors = [{ name = "Kevin Veen-Birkenbach" }]
dependencies = [
"pandas",
"dirval",
]
[project.optional-dependencies]
# Pinned: a ruff minor bump changes which rules fire, and `make test` gates on
# a clean run, so an unpinned lint would fail the suite on an unrelated day.
lint = ["ruff==0.16.1"]
[project.scripts]
baudolo = "baudolo.backup.__main__:main"
baudolo-restore = "baudolo.restore.__main__:main"
baudolo-seed = "baudolo.seed.__main__:main"
[tool.setuptools]
package-dir = { "" = "src" }
[tool.setuptools.packages.find]
where = ["src"]
exclude = ["tests*"]
[tool.setuptools.package-data]
"baudolo.restore.db" = ["*.sql"]
[tool.ruff]
respect-gitignore = true
# The package still declares >=3.9, so pyupgrade must not propose 3.10+ syntax.
target-version = "py39"
exclude = ["build", "dist", "*.egg-info", ".venv", "venv"]
[tool.ruff.lint]
# Adopted from infinito-nexus-core so both repositories are held to one bar;
# see that project's pyproject.toml for what each selector buys.
select = [
"E", "F", "I", "B", "UP", "RUF", "SIM", "C4", "PERF", "RET", "PIE",
"T10", "PGH", "EXE", "RSE", "ICN", "DTZ",
"TID", "LOG", "G",
"S",
"PTH",
"FURB", "W", "FA", "YTT", "A", "ISC", "SLOT", "FLY",
"PYI",
"TC", "N",
"PLE0605",
"PLW1510", "PLW2901", "PLW0108", "PLW0603",
"PLR5501", "PLC0207", "PLR1722", "PLR1714",
"TRY002", "TRY004", "TRY300", "TRY301",
"BLE001",
]
# E501: `ruff format` reflows what it can; the rest is unsplittable literals.
# RUF001/002/003: the prose uses em-dashes deliberately, not homoglyphs.
# S603/S607: this tool's whole job is running `docker` / dump binaries from
# PATH in list form, which is already injection-safe.
# PTH207/PTH208: changing `glob.glob`/`os.listdir` return shapes needs a
# per-call-site review, not a blanket rewrite.
ignore = [
"E501",
"RUF001", "RUF002", "RUF003",
"S603", "S607",
"PTH207", "PTH208",
]
[tool.ruff.lint.per-file-ignores]
# Test code legitimately uses what flake8-bandit flags in production code:
# asserts, dummy credentials, /tmp fixtures, broad excepts in teardown, and
# SQL built from fixture names (S608) to set the databases under test up.
"tests/**" = [
"S101", "S102", "S105", "S106", "S108", "S110", "S112", "S608", "BLE001",
]
# The e2e helpers package is a deliberate re-export aggregator.
"tests/e2e/helpers/__init__.py" = ["F403"]