Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2020-06-26 05:30:03 +0300
committerCampbell Barton <ideasman42@gmail.com>2020-06-26 05:33:19 +0300
commit646ef49e197d14e7717547a3f9ed119f5a79e2a8 (patch)
tree29daa5c9d2cc82dd6c7cd1112449558111d6f5d2 /release/scripts/startup/bl_ui/space_userpref.py
parent2db4a81fe4af0a003e545b6834c038eb7b704744 (diff)
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.
Diffstat (limited to 'release/scripts/startup/bl_ui/space_userpref.py')
-rw-r--r--release/scripts/startup/bl_ui/space_userpref.py10
1 files changed, 6 insertions, 4 deletions
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()