Re-enable Ruff UP024 (#86784)

This commit is contained in:
Franck Nijhof 2023-01-27 12:03:27 +01:00 committed by GitHub
parent a79885ceaf
commit 3ff3834cae
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 2 additions and 3 deletions

View file

@ -267,7 +267,6 @@ ignore = [
"E501", # line too long
"E713", # Test for membership should be 'not in'
"E731", # do not assign a lambda expression, use a def
"UP024", # Replace aliased errors with `OSError`
]
[tool.ruff.flake8-pytest-style]

View file

@ -1457,7 +1457,7 @@ async def test_event_listener_scheduled_write(
)
event = MagicMock(data={"new_state": state}, time_fired=12345)
write_api = get_write_api(mock_client)
write_api.side_effect = IOError("foo")
write_api.side_effect = OSError("foo")
# Write fails
with patch.object(influxdb.time, "sleep") as mock_sleep:

View file

@ -412,7 +412,7 @@ async def test_login_failed(hass: HomeAssistant, service: MagicMock):
async def test_connection_failed(hass: HomeAssistant, service: MagicMock):
"""Test when we have errors during connection."""
service.return_value.login = Mock(
side_effect=SynologyDSMRequestException(IOError("arg"))
side_effect=SynologyDSMRequestException(OSError("arg"))
)
result = await hass.config_entries.flow.async_init(