From 9b7e31eca3e43eae997a7ee486403dca51d5f991 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ville=20Skytt=C3=A4?= Date: Fri, 10 Apr 2020 10:59:06 +0300 Subject: [PATCH] Make f-strings without placeholder normal strings (#33938) --- homeassistant/components/homeassistant/scene.py | 2 +- homeassistant/components/homekit/type_lights.py | 2 +- homeassistant/helpers/config_entry_oauth2_flow.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/homeassistant/components/homeassistant/scene.py b/homeassistant/components/homeassistant/scene.py index 9dad912886d..5eadc39ebed 100644 --- a/homeassistant/components/homeassistant/scene.py +++ b/homeassistant/components/homeassistant/scene.py @@ -73,7 +73,7 @@ def _ensure_no_intersection(value): CONF_SCENE_ID = "scene_id" CONF_SNAPSHOT = "snapshot_entities" -DATA_PLATFORM = f"homeassistant_scene" +DATA_PLATFORM = "homeassistant_scene" STATES_SCHEMA = vol.All(dict, _convert_states) diff --git a/homeassistant/components/homekit/type_lights.py b/homeassistant/components/homekit/type_lights.py index e38af1a04eb..62f374c8888 100644 --- a/homeassistant/components/homekit/type_lights.py +++ b/homeassistant/components/homekit/type_lights.py @@ -115,7 +115,7 @@ class Light(HomeAccessory): if CHAR_BRIGHTNESS in char_values: if char_values[CHAR_BRIGHTNESS] == 0: - events[-1] = f"Set state to 0" + events[-1] = "Set state to 0" service = SERVICE_TURN_OFF else: params[ATTR_BRIGHTNESS_PCT] = char_values[CHAR_BRIGHTNESS] diff --git a/homeassistant/helpers/config_entry_oauth2_flow.py b/homeassistant/helpers/config_entry_oauth2_flow.py index 0ae91ad5591..0c5a5c3873e 100644 --- a/homeassistant/helpers/config_entry_oauth2_flow.py +++ b/homeassistant/helpers/config_entry_oauth2_flow.py @@ -369,7 +369,7 @@ class OAuth2AuthorizeCallbackView(HomeAssistantView): state = _decode_jwt(hass, request.query["state"]) if state is None: - return web.Response(text=f"Invalid state") + return web.Response(text="Invalid state") await hass.config_entries.flow.async_configure( flow_id=state["flow_id"], user_input=request.query["code"]