Re-enable Ruff UP024 (#86784)
This commit is contained in:
parent
a79885ceaf
commit
3ff3834cae
3 changed files with 2 additions and 3 deletions
|
@ -267,7 +267,6 @@ ignore = [
|
||||||
"E501", # line too long
|
"E501", # line too long
|
||||||
"E713", # Test for membership should be 'not in'
|
"E713", # Test for membership should be 'not in'
|
||||||
"E731", # do not assign a lambda expression, use a def
|
"E731", # do not assign a lambda expression, use a def
|
||||||
"UP024", # Replace aliased errors with `OSError`
|
|
||||||
]
|
]
|
||||||
|
|
||||||
[tool.ruff.flake8-pytest-style]
|
[tool.ruff.flake8-pytest-style]
|
||||||
|
|
|
@ -1457,7 +1457,7 @@ async def test_event_listener_scheduled_write(
|
||||||
)
|
)
|
||||||
event = MagicMock(data={"new_state": state}, time_fired=12345)
|
event = MagicMock(data={"new_state": state}, time_fired=12345)
|
||||||
write_api = get_write_api(mock_client)
|
write_api = get_write_api(mock_client)
|
||||||
write_api.side_effect = IOError("foo")
|
write_api.side_effect = OSError("foo")
|
||||||
|
|
||||||
# Write fails
|
# Write fails
|
||||||
with patch.object(influxdb.time, "sleep") as mock_sleep:
|
with patch.object(influxdb.time, "sleep") as mock_sleep:
|
||||||
|
|
|
@ -412,7 +412,7 @@ async def test_login_failed(hass: HomeAssistant, service: MagicMock):
|
||||||
async def test_connection_failed(hass: HomeAssistant, service: MagicMock):
|
async def test_connection_failed(hass: HomeAssistant, service: MagicMock):
|
||||||
"""Test when we have errors during connection."""
|
"""Test when we have errors during connection."""
|
||||||
service.return_value.login = Mock(
|
service.return_value.login = Mock(
|
||||||
side_effect=SynologyDSMRequestException(IOError("arg"))
|
side_effect=SynologyDSMRequestException(OSError("arg"))
|
||||||
)
|
)
|
||||||
|
|
||||||
result = await hass.config_entries.flow.async_init(
|
result = await hass.config_entries.flow.async_init(
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue