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>2018-06-28 09:30:54 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-06-28 09:43:58 +0300
commit597122d72b691ac6522b5ee2acd26e2b4b1135a5 (patch)
treea03b11c2c040f4a70a2e85c23f8fc7ad6fd79115 /release/scripts/startup/bl_ui/space_text.py
parent9536f67e7eb7befa12c3c6b35068ac15fbbf9032 (diff)
Cleanup: use f-strings
Diffstat (limited to 'release/scripts/startup/bl_ui/space_text.py')
-rw-r--r--release/scripts/startup/bl_ui/space_text.py24
1 files changed, 15 insertions, 9 deletions
diff --git a/release/scripts/startup/bl_ui/space_text.py b/release/scripts/startup/bl_ui/space_text.py
index 98a7da855ca..d0067012ffe 100644
--- a/release/scripts/startup/bl_ui/space_text.py
+++ b/release/scripts/startup/bl_ui/space_text.py
@@ -50,9 +50,9 @@ class TEXT_HT_header(Header):
row.prop(st, "show_syntax_highlight", text="")
if text:
- osl = text.name.endswith(".osl") or text.name.endswith(".oso")
+ is_osl = text.name.endswith((".osl", ".osl"))
- if osl:
+ if is_osl:
row = layout.row()
row.operator("node.shader_script_update")
else:
@@ -66,15 +66,21 @@ class TEXT_HT_header(Header):
row = layout.row()
if text.filepath:
if text.is_dirty:
- row.label(text=iface_("File: *%r (unsaved)") %
- text.filepath, translate=False)
+ row.label(
+ iface_(f"File: *{text.filepath} (unsaved)"),
+ translate=False,
+ )
else:
- row.label(text=iface_("File: %r") %
- text.filepath, translate=False)
+ row.label(
+ iface_(f"File: {text.filepath}"),
+ translate=False,
+ )
else:
- row.label(text="Text: External"
- if text.library
- else "Text: Internal")
+ row.label(
+ "Text: External"
+ if text.library
+ else "Text: Internal"
+ )
class TEXT_MT_editor_menus(Menu):