Unignore Ruff PLC in tests (#114572)

This commit is contained in:
Sid 2024-04-01 21:28:54 +02:00 committed by GitHub
parent ae640b6e1a
commit 304ed8bf3d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 7 additions and 8 deletions

View File

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

View File

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

View File

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

View File

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