diff options
Diffstat (limited to 'release/scripts/startup/bl_ui/space_text.py')
-rw-r--r-- | release/scripts/startup/bl_ui/space_text.py | 24 |
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): |