Various string cleanups (#30435)

* Remove some unnecessary string concatenations

* Replace some simple str.formats with f-strings

* Replace some string concatenations with f-strings
This commit is contained in:
Ville Skyttä authored and Paulus Schoutsen committed 2020-01-03 14:47:06 +01:00
1 parent 5ad209c6fd
commit fa4fa30461
105 files changed
+241 -314

No files matched your search

+2 -5
View File
@@ -59,9 +59,7 @@ def verify_cleanup():
count = len(INSTANCES)
for inst in INSTANCES:
inst.stop()
pytest.exit(
"Detected non stopped instances ({}), aborting test run".format(count)
)
pytest.exit(f"Detected non stopped instances ({count}), aborting test run")
@pytest.fixture
@@ -185,8 +183,7 @@ def hass_client(hass, aiohttp_client, hass_access_token):
async def auth_client():
"""Return an authenticated client."""
return await aiohttp_client(
hass.http.app,
headers={"Authorization": "Bearer {}".format(hass_access_token)},
hass.http.app, headers={"Authorization": f"Bearer {hass_access_token}"},
)
return auth_client