mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 05:07:41 +00:00
Unignore Ruff PLC in tests (#114572)
This commit is contained in:
parent
ae640b6e1a
commit
304ed8bf3d
@ -171,11 +171,11 @@ async def test_alarm_control_panel(
|
||||
|
||||
# Event signals alarm control panel arming
|
||||
|
||||
for arming_event in {
|
||||
for arming_event in (
|
||||
AncillaryControlPanel.ARMING_AWAY,
|
||||
AncillaryControlPanel.ARMING_NIGHT,
|
||||
AncillaryControlPanel.ARMING_STAY,
|
||||
}:
|
||||
):
|
||||
event_changed_sensor = {
|
||||
"t": "event",
|
||||
"e": "changed",
|
||||
@ -190,10 +190,10 @@ async def test_alarm_control_panel(
|
||||
|
||||
# Event signals alarm control panel pending
|
||||
|
||||
for pending_event in {
|
||||
for pending_event in (
|
||||
AncillaryControlPanel.ENTRY_DELAY,
|
||||
AncillaryControlPanel.EXIT_DELAY,
|
||||
}:
|
||||
):
|
||||
event_changed_sensor = {
|
||||
"t": "event",
|
||||
"e": "changed",
|
||||
|
@ -125,7 +125,7 @@ def get_events_fixture(
|
||||
)
|
||||
assert response.status == HTTPStatus.OK
|
||||
results = await response.json()
|
||||
return [{k: event[k] for k in {"summary", "start", "end"}} for event in results]
|
||||
return [{k: event[k] for k in ("summary", "start", "end")} for event in results]
|
||||
|
||||
return _fetch
|
||||
|
||||
|
@ -4,7 +4,6 @@ extend = "../pyproject.toml"
|
||||
[lint]
|
||||
|
||||
extend-ignore = [
|
||||
"PLC", # pylint
|
||||
"B904", # Use raise from to specify exception cause
|
||||
"N815", # Variable {name} in class scope should not be mixedCase
|
||||
]
|
||||
|
@ -2042,12 +2042,12 @@ async def test_core_config_schema_legacy_template(
|
||||
await config_util.async_process_ha_core_config(hass, config)
|
||||
|
||||
issue_registry = ir.async_get(hass)
|
||||
for issue_id in {"legacy_templates_true", "legacy_templates_false"}:
|
||||
for issue_id in ("legacy_templates_true", "legacy_templates_false"):
|
||||
issue = issue_registry.async_get_issue("homeassistant", issue_id)
|
||||
assert issue if issue_id == expected_issue else not issue
|
||||
|
||||
await config_util.async_process_ha_core_config(hass, {})
|
||||
for issue_id in {"legacy_templates_true", "legacy_templates_false"}:
|
||||
for issue_id in ("legacy_templates_true", "legacy_templates_false"):
|
||||
assert not issue_registry.async_get_issue("homeassistant", issue_id)
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user