Various string cleanups (#30435)
* Remove some unnecessary string concatenations * Replace some simple str.formats with f-strings * Replace some string concatenations with f-strings
This commit is contained in:
1 parent
5ad209c6fd
commit
fa4fa30461
105 files changed
+241
-314
No files matched your search
@@ -118,14 +118,14 @@ async def test_if_fires_on_state_change(hass, calls):
|
||||
hass.states.async_set("vacuum.entity", STATE_CLEANING)
|
||||
await hass.async_block_till_done()
|
||||
assert len(calls) == 1
|
||||
assert calls[0].data["some"] == "cleaning - device - {} - docked - cleaning".format(
|
||||
"vacuum.entity"
|
||||
assert (
|
||||
calls[0].data["some"] == "cleaning - device - vacuum.entity - docked - cleaning"
|
||||
)
|
||||
|
||||
# Fake that the entity is docked
|
||||
hass.states.async_set("vacuum.entity", STATE_DOCKED)
|
||||
await hass.async_block_till_done()
|
||||
assert len(calls) == 2
|
||||
assert calls[1].data["some"] == "docked - device - {} - cleaning - docked".format(
|
||||
"vacuum.entity"
|
||||
assert (
|
||||
calls[1].data["some"] == "docked - device - vacuum.entity - cleaning - docked"
|
||||
)
|
||||
Reference in new issue
Block a user