Run ruff format

This commit is contained in:
Stefan Agner 2025-02-11 14:10:14 +01:00
parent 3ae4744dd0
commit 503dc232c4
No known key found for this signature in database
GPG Key ID: AE01353D1E44747D
2 changed files with 10 additions and 5 deletions

View File

@ -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"

View File

@ -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