1
0
mirror of https://github.com/home-assistant/core.git synced 2025-12-24 21:06:19 +00:00

Use literal string interpolation in integrations A (f-strings) (#26377)

* Use literal string interpolation in integrations A (f-strings)

* Black
This commit is contained in:
Franck Nijhof
2019-09-03 16:11:36 +02:00
committed by Andrew Sayre
parent 3534b8a977
commit ad51615718
37 changed files with 74 additions and 95 deletions

View File

@@ -137,9 +137,9 @@ class AxisFlowHandler(config_entries.ConfigFlow, domain=DOMAIN):
if entry.data[CONF_MODEL] == self.model
]
self.name = "{}".format(self.model)
self.name = f"{self.model}"
for idx in range(len(same_model) + 1):
self.name = "{} {}".format(self.model, idx)
self.name = f"{self.model} {idx}"
if self.name not in same_model:
break
@@ -150,7 +150,7 @@ class AxisFlowHandler(config_entries.ConfigFlow, domain=DOMAIN):
CONF_MODEL: self.model,
}
title = "{} - {}".format(self.model, self.serial_number)
title = f"{self.model} - {self.serial_number}"
return self.async_create_entry(title=title, data=data)
async def _update_entry(self, entry, host):