Enable T20 (flake8-print) to ban use of print statements (#86525)

* Enable T20 (flake8-print) to ban use of print statements

* Make compatible with flake8 config
This commit is contained in:
Franck Nijhof
2023-01-24 14:24:21 +01:00
committed by GitHub
parent c9499f6574
commit 73c4ac53d2
9 changed files with 24 additions and 30 deletions

View File

@@ -24,21 +24,13 @@ async def test_component_dependencies(hass):
mock_integration(hass, MockModule("mod1", ["mod3"]))
with pytest.raises(loader.CircularDependency):
print(
await loader._async_component_dependencies(
hass, "mod_3", mod_3, set(), set()
)
)
await loader._async_component_dependencies(hass, "mod_3", mod_3, set(), set())
# Depend on non-existing component
mod_1 = mock_integration(hass, MockModule("mod1", ["nonexisting"]))
with pytest.raises(loader.IntegrationNotFound):
print(
await loader._async_component_dependencies(
hass, "mod_1", mod_1, set(), set()
)
)
await loader._async_component_dependencies(hass, "mod_1", mod_1, set(), set())
# Having an after dependency 2 deps down that is circular
mod_1 = mock_integration(
@@ -46,11 +38,7 @@ async def test_component_dependencies(hass):
)
with pytest.raises(loader.CircularDependency):
print(
await loader._async_component_dependencies(
hass, "mod_3", mod_3, set(), set()
)
)
await loader._async_component_dependencies(hass, "mod_3", mod_3, set(), set())
def test_component_loader(hass):