Use f-strings in integrations starting with "F"and"G" (#32150)

* Use f-strings in integrations starting with F

* Use f-strings in tests for integrations starting with F

* Use f-strings in integrations starting with G

* Use f-strings in tests for integrations starting with G

* Fix pylint error

* Fix broken test
This commit is contained in:
springstan authored and GitHub committed 2020-02-24 17:54:20 -08:00
1 parent 496bd3dddf
commit ad102b3840
59 files changed
+219 -344

No files matched your search

@@ -50,8 +50,8 @@ MANIFEST_JSON = {
"display": "standalone",
"icons": [
{
"src": "/static/icons/favicon-{size}x{size}.png".format(size=size),
"sizes": "{size}x{size}".format(size=size),
"src": f"/static/icons/favicon-{size}x{size}.png",
"sizes": f"{size}x{size}",
"type": "image/png",
"purpose": "maskable any",
}
+1 -3
View File
@@ -9,7 +9,6 @@ from homeassistant.components import websocket_api
DATA_STORAGE = "frontend_storage"
STORAGE_VERSION_USER_DATA = 1
STORAGE_KEY_USER_DATA = "frontend.user_data_{}"
async def async_setup_frontend_storage(hass):
@@ -31,8 +30,7 @@ def with_store(orig_func):
if store is None:
store = stores[user_id] = hass.helpers.storage.Store(
STORAGE_VERSION_USER_DATA,
STORAGE_KEY_USER_DATA.format(connection.user.id),
STORAGE_VERSION_USER_DATA, f"frontend.user_data_{connection.user.id}"
)
if user_id not in data: