mirror of
https://github.com/kevinveenbirkenbach/docker-volume-backup.git
synced 2026-08-20 21:22:54 +00:00
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>
This commit is contained in:
@@ -51,7 +51,7 @@ class TestSeedMain(unittest.TestCase):
|
||||
|
||||
return df
|
||||
|
||||
@patch("baudolo.seed.__main__.os.path.exists", return_value=False)
|
||||
@patch("baudolo.seed.__main__.Path.exists", return_value=False)
|
||||
@patch("baudolo.seed.__main__.pd.read_csv")
|
||||
@patch("baudolo.seed.__main__._empty_df")
|
||||
@patch("baudolo.seed.__main__.pd.concat")
|
||||
@@ -83,7 +83,7 @@ class TestSeedMain(unittest.TestCase):
|
||||
"/tmp/databases.csv", sep=";", index=False
|
||||
)
|
||||
|
||||
@patch("baudolo.seed.__main__.os.path.exists", return_value=True)
|
||||
@patch("baudolo.seed.__main__.Path.exists", return_value=True)
|
||||
@patch("baudolo.seed.__main__.pd.read_csv", side_effect=EmptyDataError("empty"))
|
||||
@patch("baudolo.seed.__main__._empty_df")
|
||||
@patch("baudolo.seed.__main__.pd.concat")
|
||||
@@ -110,8 +110,8 @@ class TestSeedMain(unittest.TestCase):
|
||||
password="pass",
|
||||
)
|
||||
|
||||
exists.assert_called_once_with("/tmp/databases.csv")
|
||||
read_csv.assert_called_once()
|
||||
exists.assert_called_once_with()
|
||||
self.assertEqual(read_csv.call_args.args, ("/tmp/databases.csv",))
|
||||
empty_df.assert_called_once()
|
||||
concat.assert_called_once()
|
||||
|
||||
@@ -133,7 +133,7 @@ class TestSeedMain(unittest.TestCase):
|
||||
"/tmp/databases.csv", sep=";", index=False
|
||||
)
|
||||
|
||||
@patch("baudolo.seed.__main__.os.path.exists", return_value=True)
|
||||
@patch("baudolo.seed.__main__.Path.exists", return_value=True)
|
||||
@patch("baudolo.seed.__main__.pd.read_csv")
|
||||
def test_check_and_add_entry_updates_existing_row(
|
||||
self,
|
||||
|
||||
Reference in New Issue
Block a user