From 503dc232c4edf0a567c049b30573b7a4cce405b4 Mon Sep 17 00:00:00 2001 From: Stefan Agner Date: Tue, 11 Feb 2025 14:10:14 +0100 Subject: [PATCH] Run ruff format --- supervisor/jobs/decorator.py | 10 ++++++++-- .../resolution/evaluation/test_system_architecture.py | 5 ++--- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/supervisor/jobs/decorator.py b/supervisor/jobs/decorator.py index b2b8086a5..fc324d671 100644 --- a/supervisor/jobs/decorator.py +++ b/supervisor/jobs/decorator.py @@ -17,7 +17,12 @@ from ..exceptions import ( JobGroupExecutionLimitExceeded, ) from ..host.const import HostFeature -from ..resolution.const import MINIMUM_FREE_SPACE_THRESHOLD, ContextType, IssueType, UnsupportedReason +from ..resolution.const import ( + MINIMUM_FREE_SPACE_THRESHOLD, + ContextType, + IssueType, + UnsupportedReason, +) from ..utils.sentry import capture_exception from . import SupervisorJob from .const import JobCondition, JobExecutionLimit @@ -437,7 +442,8 @@ class Job(CoreSysAttributes): ) if ( JobCondition.ARCHITECTURE_SUPPORTED in used_conditions - and UnsupportedReason.SYSTEM_ARCHITECTURE in coresys.sys_resolution.unsupported + and UnsupportedReason.SYSTEM_ARCHITECTURE + in coresys.sys_resolution.unsupported ): raise JobConditionException( f"'{method_name}' blocked from execution, unsupported system architecture" diff --git a/tests/resolution/evaluation/test_system_architecture.py b/tests/resolution/evaluation/test_system_architecture.py index 05706087d..d271b4199 100644 --- a/tests/resolution/evaluation/test_system_architecture.py +++ b/tests/resolution/evaluation/test_system_architecture.py @@ -21,7 +21,7 @@ async def test_evaluation_unsupported_architectures( coresys.core.state = CoreState.INITIALIZE with patch.object( - type(coresys.supervisor), "arch", PropertyMock(return_value=arch) + type(coresys.supervisor), "arch", PropertyMock(return_value=arch) ): await system_architecture() assert system_architecture.reason in coresys.resolution.unsupported @@ -37,8 +37,7 @@ async def test_evaluation_supported_architectures( coresys.core.state = CoreState.INITIALIZE with patch.object( - type(coresys.supervisor), "arch", PropertyMock(return_value=arch) + type(coresys.supervisor), "arch", PropertyMock(return_value=arch) ): await system_architecture() assert system_architecture.reason not in coresys.resolution.unsupported -