Use literal string interpolation in integrations R-S (f-strings) (#26392)
This commit is contained in:
parent
7203027cbf
commit
445c741b30
69 changed files with 129 additions and 149 deletions
|
@ -208,7 +208,7 @@ class LogitechMediaServer:
|
|||
if self._username is None
|
||||
else aiohttp.BasicAuth(self._username, self._password)
|
||||
)
|
||||
url = "http://{}:{}/jsonrpc.js".format(self.host, self.port)
|
||||
url = f"http://{self.host}:{self.port}/jsonrpc.js"
|
||||
data = json.dumps(
|
||||
{"id": "1", "method": "slim.request", "params": [player, command]}
|
||||
)
|
||||
|
@ -288,9 +288,7 @@ class SqueezeBoxDevice(MediaPlayerDevice):
|
|||
async def async_update(self):
|
||||
"""Retrieve the current state of the player."""
|
||||
tags = "adKl"
|
||||
response = await self.async_query(
|
||||
"status", "-", "1", "tags:{tags}".format(tags=tags)
|
||||
)
|
||||
response = await self.async_query("status", "-", "1", f"tags:{tags}")
|
||||
|
||||
if response is False:
|
||||
return
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue