Enable Ruff PT022 (#86792)

* Enable Ruff PT022

* Adjust found cases
This commit is contained in:
Franck Nijhof
2023-01-27 13:57:06 +01:00
committed by GitHub
parent 8c993116e1
commit ef800335fb
50 changed files with 79 additions and 88 deletions

View File

@@ -205,7 +205,7 @@ util.get_local_ip = lambda: "127.0.0.1"
def caplog_fixture(caplog):
"""Set log level to debug for tests using the caplog fixture."""
caplog.set_level(logging.DEBUG)
yield caplog
return caplog
@pytest.fixture(autouse=True, scope="module")
@@ -1103,7 +1103,7 @@ async def async_setup_recorder_instance(
@pytest.fixture
async def recorder_mock(recorder_config, async_setup_recorder_instance, hass):
"""Fixture with in-memory recorder."""
yield await async_setup_recorder_instance(hass, recorder_config)
return await async_setup_recorder_instance(hass, recorder_config)
@pytest.fixture