@@ -82,7 +82,7 @@ def run(self) -> Any:
82
82
83
83
def do_custom (self ) -> Any :
84
84
class_instance : Union [gitlab .base .RESTManager , gitlab .base .RESTObject ]
85
- in_obj = cli .custom_actions [self .cls_name ][self .resource_action ][ 2 ]
85
+ in_obj = cli .custom_actions [self .cls_name ][self .resource_action ]. in_object
86
86
87
87
# Get the object (lazy), then act
88
88
if in_obj :
@@ -321,13 +321,13 @@ def _populate_sub_parser_by_class(
321
321
id_attr = cls ._id_attr .replace ("_" , "-" )
322
322
sub_parser_action .add_argument (f"--{ id_attr } " , required = True )
323
323
324
- required , optional , dummy = cli .custom_actions [name ][action_name ]
325
- for x in required :
324
+ custom_action = cli .custom_actions [name ][action_name ]
325
+ for x in custom_action . required :
326
326
if x != cls ._id_attr :
327
327
sub_parser_action .add_argument (
328
328
f"--{ x .replace ('_' , '-' )} " , required = True
329
329
)
330
- for x in optional :
330
+ for x in custom_action . optional :
331
331
if x != cls ._id_attr :
332
332
sub_parser_action .add_argument (
333
333
f"--{ x .replace ('_' , '-' )} " , required = False
@@ -350,13 +350,13 @@ def _populate_sub_parser_by_class(
350
350
)
351
351
sub_parser_action .add_argument ("--sudo" , required = False )
352
352
353
- required , optional , dummy = cli .custom_actions [name ][action_name ]
354
- for x in required :
353
+ custom_action = cli .custom_actions [name ][action_name ]
354
+ for x in custom_action . required :
355
355
if x != cls ._id_attr :
356
356
sub_parser_action .add_argument (
357
357
f"--{ x .replace ('_' , '-' )} " , required = True
358
358
)
359
- for x in optional :
359
+ for x in custom_action . optional :
360
360
if x != cls ._id_attr :
361
361
sub_parser_action .add_argument (
362
362
f"--{ x .replace ('_' , '-' )} " , required = False
0 commit comments