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:
Ville Skyttä
2020-01-03 14:47:06 +01:00
committed by Paulus Schoutsen
parent 5ad209c6fd
commit fa4fa30461
105 changed files with 241 additions and 314 deletions
+1 -1
View File
@@ -37,7 +37,7 @@ def _to_hex_str(id_in_bytes):
Example: 0x1234 --> '0x1234'
"""
return "0x{:04x}".format(id_in_bytes)
return f"0x{id_in_bytes:04x}"
# For some reason node.manufacturer_id is of type string. So we need to convert