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
@@ -84,7 +84,7 @@ async def test_discovery_single_instance(hass, discovery_flow_conf, source):
|
||||
flow.context = {}
|
||||
|
||||
MockConfigEntry(domain="test").add_to_hass(hass)
|
||||
result = await getattr(flow, "async_step_{}".format(source))({})
|
||||
result = await getattr(flow, f"async_step_{source}")({})
|
||||
|
||||
assert result["type"] == data_entry_flow.RESULT_TYPE_ABORT
|
||||
assert result["reason"] == "single_instance_allowed"
|
||||
@@ -97,7 +97,7 @@ async def test_discovery_confirmation(hass, discovery_flow_conf, source):
|
||||
flow.hass = hass
|
||||
flow.context = {}
|
||||
|
||||
result = await getattr(flow, "async_step_{}".format(source))({})
|
||||
result = await getattr(flow, f"async_step_{source}")({})
|
||||
|
||||
assert result["type"] == data_entry_flow.RESULT_TYPE_FORM
|
||||
assert result["step_id"] == "confirm"
|
||||
|
||||
Reference in new issue
Block a user