mirror of
https://github.com/home-assistant/supervisor.git
synced 2025-04-19 10:47:15 +00:00
Run ruff format
This commit is contained in:
parent
3ae4744dd0
commit
503dc232c4
@ -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"
|
||||
|
@ -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
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user