mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2026-11-30 06:46:31 +00:00
style: apply make autoformat to files committed unformatted
ruff format reflows the package batch, registry, plan and invocation code and tests and the Stalwart and Nextcloud tests, ansible-lint rewraps long Jinja lines in folded scalars of sys-service, Nextcloud and SeaweedFS, mbake restores the Makefile's final newline, and the Nextcloud OAuth test merges its nested with statements (SIM117). Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
26e95bb174
commit
3dc35655a3
15 files changed
+67
-43
No files matched your search
@@ -209,7 +209,9 @@ class TestMergePlans(unittest.TestCase):
|
||||
|
||||
def test_bootstrap_packages_install_before_every_name(self):
|
||||
epel = {"repo": {"bootstrap_package": "epel-release"}}
|
||||
merged = merge_plans([_plan("git"), _plan("micro", **epel), _plan("jq", **epel)])
|
||||
merged = merge_plans(
|
||||
[_plan("git"), _plan("micro", **epel), _plan("jq", **epel)]
|
||||
)
|
||||
self.assertEqual(
|
||||
[_names(call) for call in merged[0]],
|
||||
[["epel-release"], ["git", "micro", "jq"]],
|
||||
|
||||
@@ -229,15 +229,11 @@ class TestRegistry(unittest.TestCase):
|
||||
self.assertTrue(self._declaration("git").batch)
|
||||
|
||||
def test_batch_false_keeps_the_id_out_of_the_batch(self):
|
||||
_write_role(
|
||||
self.root, "role-a", {"git": {"Debian": ["git"], "batch": False}}
|
||||
)
|
||||
_write_role(self.root, "role-a", {"git": {"Debian": ["git"], "batch": False}})
|
||||
self.assertFalse(self._declaration("git").batch)
|
||||
|
||||
def test_the_batch_flag_is_no_distro_key(self):
|
||||
_write_role(
|
||||
self.root, "role-a", {"git": {"Debian": ["git"], "batch": False}}
|
||||
)
|
||||
_write_role(self.root, "role-a", {"git": {"Debian": ["git"], "batch": False}})
|
||||
self.assertIsNone(resolve(self._declaration("git"), "arch"))
|
||||
|
||||
def test_non_boolean_batch_raises(self):
|
||||
|
||||
@@ -114,7 +114,9 @@ class TestRoleInvocations(_TreeMixin, unittest.TestCase):
|
||||
self.assertEqual(self._invoked(tasks), {"role-b", "role-c"})
|
||||
|
||||
def test_quoted_names_are_ignored_while_every_include_resolves(self):
|
||||
self._write(_role_file("role-a", ROLE_FILE_VARS_MAIN), {"OTHER": "{{ 'role-c' }}"})
|
||||
self._write(
|
||||
_role_file("role-a", ROLE_FILE_VARS_MAIN), {"OTHER": "{{ 'role-c' }}"}
|
||||
)
|
||||
self.assertEqual(
|
||||
self._invoked([{"include_role": {"name": "role-b"}}]), {"role-b"}
|
||||
)
|
||||
@@ -156,9 +158,7 @@ class TestStageInvocations(_TreeMixin, unittest.TestCase):
|
||||
[{"include_role": {"name": "role-b"}, "when": "'role-b' in group_names"}]
|
||||
)
|
||||
self.assertEqual(
|
||||
stage_invocations(
|
||||
path, frozenset(ROLES), seeds=[], group_names=["role-b"]
|
||||
),
|
||||
stage_invocations(path, frozenset(ROLES), seeds=[], group_names=["role-b"]),
|
||||
{"role-b"},
|
||||
)
|
||||
|
||||
@@ -172,15 +172,11 @@ class TestStageInvocations(_TreeMixin, unittest.TestCase):
|
||||
]
|
||||
)
|
||||
self.assertEqual(
|
||||
stage_invocations(
|
||||
path, frozenset(ROLES), seeds=[], group_names=["role-b"]
|
||||
),
|
||||
stage_invocations(path, frozenset(ROLES), seeds=[], group_names=["role-b"]),
|
||||
set(),
|
||||
)
|
||||
self.assertEqual(
|
||||
stage_invocations(
|
||||
path, frozenset(ROLES), seeds=["role-b"], group_names=[]
|
||||
),
|
||||
stage_invocations(path, frozenset(ROLES), seeds=["role-b"], group_names=[]),
|
||||
{"role-b"},
|
||||
)
|
||||
|
||||
|
||||
Reference in new issue
Block a user