Cleanup: use keyword only args to rna_idprop_ui_create
authorCampbell Barton <ideasman42@gmail.com>
Tue, 16 Apr 2019 14:00:24 +0000 (16:00 +0200)
committerCampbell Barton <ideasman42@gmail.com>
Tue, 16 Apr 2019 14:00:24 +0000 (16:00 +0200)
release/scripts/modules/rna_prop_ui.py
release/scripts/startup/bl_operators/wm.py

index 7fcb5e8..d01e891 100644 (file)
@@ -120,7 +120,13 @@ def rna_idprop_ui_prop_default_set(item, prop, value):
             del rna_ui["default"]
 
 
-def rna_idprop_ui_create(item, prop, default, min=0.0, max=1.0, soft_min=None, soft_max=None, description=None, overridable=False):
+def rna_idprop_ui_create(
+        item, prop, *, default,
+        min=0.0, max=1.0,
+        soft_min=None, soft_max=None,
+        description=None,
+        overridable=False,
+):
     """Create and initialize a custom property with limits, defaults and other settings."""
 
     proptype = type(default)
index e22f50d..5976e03 100644 (file)
@@ -1343,7 +1343,7 @@ class WM_OT_properties_add(Operator):
             *type(item).bl_rna.properties.keys(),
         })
 
-        rna_idprop_ui_create(item, prop, 1.0)
+        rna_idprop_ui_create(item, prop, default=1.0)
 
         return {'FINISHED'}