Cleanup: argument wrapping for Python scripts

- Wrap the closing parenthesis onto it's own line
  which makes assignments to the return value
  read better.
- Reduce right-shift with multi-line function calls.
This commit is contained in:
Campbell Barton
2025-01-14 12:46:40 +11:00
parent 6430974868
commit be0c9174aa
45 changed files with 343 additions and 181 deletions

View File

@@ -55,7 +55,8 @@ def add_object_button(self, context):
self.layout.operator(
OBJECT_OT_add_object.bl_idname,
text="Add Object",
icon='PLUGIN')
icon='PLUGIN',
)
# This allows you to right click on a button and link to documentation

View File

@@ -56,8 +56,10 @@ class UIListPanelExample(bpy.types.Panel):
# The second one can usually be left as an empty string.
# It's an additional ID used to distinguish lists in case you
# use the same list several times in a given area.
layout.template_list("MATERIAL_UL_matslots_example", "compact", obj, "material_slots",
obj, "active_material_index", type='COMPACT')
layout.template_list(
"MATERIAL_UL_matslots_example", "compact", obj, "material_slots",
obj, "active_material_index", type='COMPACT',
)
def register():