style(resource): apply autoformat to the lookup and its tests

Output of `make quality-high`, which rewrites the tree before it tests it.
Formatting only: the YAML null goes from `~` to an empty value, which parses
the same, and the Python changes are line reflow plus the parenthesized `with`
groups.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
kevinveenbirkenbachandClaude Opus 5 committed 2026-09-14 14:53:39 +02:00
1 parent ad5dbc0250
commit 6ce96086e8
4 files changed
+11 -12

No files matched your search

@@ -43,8 +43,9 @@ def _vars(**overrides):
def _run(terms, variables=None, **kwargs):
lookup = LookupModule()
lookup._templar = None
with patch("plugins.lookup.resource.os.cpu_count", return_value=_CPUS), patch(
"plugins.lookup.resource.mem_total_mb", return_value=_MEM_MB
with (
patch("plugins.lookup.resource.os.cpu_count", return_value=_CPUS),
patch("plugins.lookup.resource.mem_total_mb", return_value=_MEM_MB),
):
return lookup.run(terms, variables=variables or _vars(), **kwargs)
@@ -86,9 +87,10 @@ class TestResourceMeasurement(unittest.TestCase):
def test_an_unusable_probe_raises(self) -> None:
lookup = LookupModule()
lookup._templar = None
with patch(
"plugins.lookup.resource.os.cpu_count", return_value=0
), self.assertRaises(UnresolvableValueError) as caught:
with (
patch("plugins.lookup.resource.os.cpu_count", return_value=0),
self.assertRaises(UnresolvableValueError) as caught,
):
lookup.run(["host_cpus"], variables=_vars())
self.assertIn("RESOURCE_HOST_CPUS_OVERRIDE", str(caught.exception))