Commit Graph
6 Commits
Author SHA1 Message Date
Fuxino fa3ba2a6bd Make inputs and backup_dir optional in the config file
They can come from -i and -o; missing ones were rejected as a bad configuration file (exit code 6).
2026-10-21 22:26:55 +02:00
Fuxino 535f7a33fe Reject keep values below -1
A keep below -1 made remove_old_backups() delete every backup, including the new one, and then crash.
2026-10-21 22:16:47 +02:00
Fuxino 17c104c6c8 Add ruff linting
Configure ruff in pyproject.toml and apply its fixes: modern annotations
(X | None, builtin generics, collections.abc), sorted imports, explicit
stacklevel in test warnings.
2026-10-16 13:47:24 +02:00
Fuxino 7cd90f8d11 Add a progress bar for rsync
On a terminal, run rsync with --info=progress2 and draw its updates as a
progress bar on stderr. The ETA is estimated locally, since rsync reports
the elapsed time when a file finishes. Disable it with --no-progress.
2026-10-14 09:46:50 +02:00
Fuxino cfe3b28436 Fix mypy errors in the tests
The config values are now a TypedDict, so check inputs for None before sorting, use literal keys and use ConfigArgs as the fake _read_config() return type.
2026-10-14 08:37:06 +02:00
Fuxino dbb0aadc84 Add tests for command line handling and user detection
Test how command line and config values are combined, the exit codes for an incomplete SSH setup and a bad config, and the user detection under sudo/doas (simulated by patching geteuid and the environment).
2026-10-14 08:10:02 +02:00