Improve string formatting v5 (#33697)

* Improve string formatting v5

* Address review comments
This commit is contained in:
springstan authored and GitHub committed 2020-04-05 17:48:55 +02:00
1 parent 39336d3ea3
commit fca90a8ddc
46 files changed
+221 -252

No files matched your search

+2 -4
View File
@@ -261,7 +261,7 @@ def _obj_to_dict(obj):
def _value_name(value):
"""Return the name of the value."""
return "{} {}".format(node_name(value.node), value.label).strip()
return f"{node_name(value.node)} {value.label}".strip()
def nice_print_node(node):
@@ -826,9 +826,7 @@ async def async_setup_entry(hass, config_entry):
)
return
_LOGGER.info(
"Node %s on instance %s does not have resettable meters.",
node_id,
instance,
"Node %s on instance %s does not have resettable meters.", node_id, instance
)
def heal_node(service):