Cleanup: f-string use

This commit is contained in:
Campbell Barton 2018-07-14 09:32:52 +02:00
parent 9d1ad27fdc
commit 0f340a1fa2
2 changed files with 3 additions and 3 deletions

View File

@ -220,8 +220,8 @@ class OUTLINER_MT_object(Menu):
if object_mode in {'EDIT', 'POSE'}:
name = bpy.types.Object.bl_rna.properties["mode"].enum_items[object_mode].name
layout.operator("outliner.object_operation", text=f"{name} Set").type = 'OBJECT_MODE_ENTER'
layout.operator("outliner.object_operation", text=f"{name} Clear").type = 'OBJECT_MODE_EXIT'
layout.operator("outliner.object_operation", text=f"{name:s} Set").type = 'OBJECT_MODE_ENTER'
layout.operator("outliner.object_operation", text=f"{name:s} Clear").type = 'OBJECT_MODE_EXIT'
del name
layout.separator()

View File

@ -293,7 +293,7 @@ class ToolSelectPanelHelper:
def _km_action_simple(cls, kc, context_mode, text, keymap_fn):
if context_mode is None:
context_mode = "All"
km_idname = f"{cls.keymap_prefix} {context_mode}, {text}"
km_idname = f"{cls.keymap_prefix:s} {context_mode:s}, {text:s}"
km = kc.keymaps.get(km_idname)
if km is None:
km = kc.keymaps.new(km_idname, space_type=cls.bl_space_type, region_type='WINDOW')