From 646ef49e197d14e7717547a3f9ed119f5a79e2a8 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Fri, 26 Jun 2020 12:30:03 +1000 Subject: Cleanup: use percentage formatting `str.format` and `f-string` use was minimal. Prefer using a single style of string formatting unless an alternative is more widely adopted. --- release/scripts/startup/bl_ui/space_userpref.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'release/scripts/startup/bl_ui/space_userpref.py') diff --git a/release/scripts/startup/bl_ui/space_userpref.py b/release/scripts/startup/bl_ui/space_userpref.py index 599f89a000d..c1502165e44 100644 --- a/release/scripts/startup/bl_ui/space_userpref.py +++ b/release/scripts/startup/bl_ui/space_userpref.py @@ -45,7 +45,7 @@ class USERPREF_HT_header(Header): # Show '*' to let users know the preferences have been modified. layout.operator( "wm.save_userpref", - text="Save Preferences{:s}".format(" *" if prefs.is_dirty else ""), + text="Save Preferences" + (" *" if prefs.is_dirty else ""), ) def draw(self, context): @@ -1903,8 +1903,10 @@ class USERPREF_PT_addons(AddOnPanel, Panel): "wm.url_open", text="Report a Bug", icon='URL', ).url = info["tracker_url"] elif not user_addon: - addon_info = ("Name: {} {}\nAuthor: {}\n").format( - info["name"], info["version"], info["author"]) + addon_info = ( + "Name: %s %s\n" + "Author: %s\n" + ) % (info["name"], str(info["version"]), info["author"]) props = sub.operator( "wm.url_open_preset", text="Report a Bug", icon='URL', ) @@ -1987,7 +1989,7 @@ class StudioLightPanelMixin: for studio_light in lights: self.draw_studio_light(flow, studio_light) else: - layout.label(text="No custom {} configured".format(self.bl_label)) + layout.label(text="No custom %s configured" % self.bl_label) def draw_studio_light(self, layout, studio_light): box = layout.box() -- cgit v1.2.3