Use literal string interpolation in integrations X-Z (f-strings) (#26395)
This commit is contained in:
parent
445c741b30
commit
dae6895a95
36 changed files with 115 additions and 137 deletions
|
@ -106,7 +106,7 @@ class YrSensor(Entity):
|
|||
@property
|
||||
def name(self):
|
||||
"""Return the name of the sensor."""
|
||||
return "{} {}".format(self.client_name, self._name)
|
||||
return f"{self.client_name} {self._name}"
|
||||
|
||||
@property
|
||||
def state(self):
|
||||
|
@ -168,7 +168,7 @@ class YrData:
|
|||
with async_timeout.timeout(10):
|
||||
resp = await websession.get(self._url, params=self._urlparams)
|
||||
if resp.status != 200:
|
||||
try_again("{} returned {}".format(resp.url, resp.status))
|
||||
try_again(f"{resp.url} returned {resp.status}")
|
||||
return
|
||||
text = await resp.text()
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue