@@ -327,12 +327,15 @@ def decorator(cls):
327327 helps [name ] = yaml .safe_dump (cls .AZ_HELP )
328328
329329 if is_preview :
330- cls .AZ_PREVIEW_INFO = partial (PreviewItem , target = f'az { name } ' , object_type = 'command group' )
330+ cls .AZ_PREVIEW_INFO = staticmethod (partial (PreviewItem ,
331+ target = f'az { name } ' , object_type = 'command group' ))
331332 if is_experimental :
332- cls .AZ_EXPERIMENTAL_INFO = partial (ExperimentalItem , target = f'az { name } ' , object_type = 'command group' )
333+ cls .AZ_EXPERIMENTAL_INFO = staticmethod (partial (ExperimentalItem ,
334+ target = f'az { name } ' , object_type = 'command group' ))
333335 if deprecated_info :
334- cls .AZ_DEPRECATE_INFO = partial (Deprecated , target = f'az { name } ' , object_type = 'command group' ,
335- ** deprecated_info )
336+ cls .AZ_DEPRECATE_INFO = staticmethod (partial (Deprecated ,
337+ target = f'az { name } ' , object_type = 'command group' ,
338+ ** deprecated_info ))
336339 return cls
337340
338341 return decorator
@@ -369,11 +372,13 @@ def decorator(cls):
369372 if confirmation :
370373 cls .AZ_CONFIRMATION = confirmation
371374 if is_preview :
372- cls .AZ_PREVIEW_INFO = partial (PreviewItem , target = f'az { name } ' , object_type = 'command' )
375+ cls .AZ_PREVIEW_INFO = staticmethod ( partial (PreviewItem , target = f'az { name } ' , object_type = 'command' ) )
373376 if is_experimental :
374- cls .AZ_EXPERIMENTAL_INFO = partial (ExperimentalItem , target = f'az { name } ' , object_type = 'command' )
377+ cls .AZ_EXPERIMENTAL_INFO = staticmethod (partial (ExperimentalItem ,
378+ target = f'az { name } ' , object_type = 'command' ))
375379 if deprecated_info :
376- cls .AZ_DEPRECATE_INFO = partial (Deprecated , target = f'az { name } ' , object_type = 'command' , ** deprecated_info )
380+ cls .AZ_DEPRECATE_INFO = staticmethod (partial (Deprecated , target = f'az { name } ' ,
381+ object_type = 'command' , ** deprecated_info ))
377382 return cls
378383
379384 return decorator
0 commit comments