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
@@ -8,7 +8,7 @@ def icon_for_battery_level(
|
||||
"""Return a battery icon valid identifier."""
|
||||
icon = "mdi:battery"
|
||||
if battery_level is None:
|
||||
return icon + "-unknown"
|
||||
return f"{icon}-unknown"
|
||||
if charging and battery_level > 10:
|
||||
icon += "-charging-{}".format(int(round(battery_level / 20 - 0.01)) * 20)
|
||||
elif charging:
|
||||
|
||||
Reference in new issue
Block a user