Skip to content

Commit

Permalink
replace format with f-string
Browse files Browse the repository at this point in the history
  • Loading branch information
ucpy7374 committed Mar 12, 2024
1 parent 2a75891 commit dfc351f
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions custom_components/deltadore_tydom/tydom/tydom_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -664,9 +664,7 @@ async def _put_alarm_cdata(self, device_id, endpoint_id=None, alarm_pin=None, va

str_request = (
self._cmd_prefix
+ "PUT /devices/{device}/endpoints/{alarm}/cdata?name={cmd} HTTP/1.1\r\nContent-Length: ".format(
device=str(device_id), alarm=str(endpoint_id), cmd=str(cmd)
)
+ f"PUT /devices/{device_id}/endpoints/{endpoint_id}/cdata?name={cmd} HTTP/1.1\r\nContent-Length: "
+ str(len(body))
+ "\r\nContent-Type: application/json; charset=UTF-8\r\nTransac-Id: 0\r\n\r\n"
+ body
Expand Down

0 comments on commit dfc351f

Please sign in to comment.