5050# Most of these methods override print methods in CLIHelp
5151class CLIPrintMixin (CLIHelp ):
5252 def _print_header (self , cli_name , help_file ):
53- super (CLIPrintMixin , self )._print_header (cli_name , help_file )
53+ super ()._print_header (cli_name , help_file )
5454
5555 links = help_file .links
5656 if links :
@@ -61,7 +61,7 @@ def _print_header(self, cli_name, help_file):
6161
6262 def _print_detailed_help (self , cli_name , help_file ):
6363 CLIPrintMixin ._print_extensions_msg (help_file )
64- super (CLIPrintMixin , self )._print_detailed_help (cli_name , help_file )
64+ super ()._print_detailed_help (cli_name , help_file )
6565 self ._print_az_find_message (help_file .command )
6666
6767 @staticmethod
@@ -131,12 +131,11 @@ def _print_extensions_msg(help_file):
131131class AzCliHelp (CLIPrintMixin , CLIHelp ):
132132
133133 def __init__ (self , cli_ctx ):
134- super (AzCliHelp , self ).__init__ (cli_ctx ,
135- privacy_statement = PRIVACY_STATEMENT ,
136- welcome_message = WELCOME_MESSAGE ,
137- command_help_cls = CliCommandHelpFile ,
138- group_help_cls = CliGroupHelpFile ,
139- help_cls = CliHelpFile )
134+ super ().__init__ (cli_ctx , privacy_statement = PRIVACY_STATEMENT ,
135+ welcome_message = WELCOME_MESSAGE ,
136+ command_help_cls = CliCommandHelpFile ,
137+ group_help_cls = CliGroupHelpFile ,
138+ help_cls = CliHelpFile )
140139 from knack .help import HelpObject
141140
142141 # TODO: This workaround is used to avoid a bizarre bug in Python 2.7. It
@@ -247,7 +246,7 @@ class CliHelpFile(KnackHelpFile):
247246
248247 def __init__ (self , help_ctx , delimiters ):
249248 # Each help file (for a command or group) has a version denoting the source of its data.
250- super (CliHelpFile , self ).__init__ (help_ctx , delimiters )
249+ super ().__init__ (help_ctx , delimiters )
251250 self .links = []
252251
253252 from knack .deprecation import resolve_deprecate_info , ImplicitDeprecated , Deprecated
@@ -376,7 +375,7 @@ def load(self, options):
376375class CliCommandHelpFile (KnackCommandHelpFile , CliHelpFile ):
377376
378377 def __init__ (self , help_ctx , delimiters , parser ):
379- super (CliCommandHelpFile , self ).__init__ (help_ctx , delimiters , parser )
378+ super ().__init__ (help_ctx , delimiters , parser )
380379 self .type = 'command'
381380 self .command_source = getattr (parser , 'command_source' , None )
382381
@@ -409,7 +408,7 @@ def __init__(self, help_ctx, delimiters, parser):
409408 param .__class__ = HelpParameter
410409
411410 def _load_from_data (self , data ):
412- super (CliCommandHelpFile , self )._load_from_data (data )
411+ super ()._load_from_data (data )
413412
414413 if isinstance (data , str ) or not self .parameters or not data .get ('parameters' ):
415414 return
@@ -433,7 +432,7 @@ class ArgumentGroupRegistry(KnackArgumentGroupRegistry): # pylint: disable=too-
433432
434433 def __init__ (self , group_list ):
435434
436- super (ArgumentGroupRegistry , self ).__init__ (group_list )
435+ super ().__init__ (group_list )
437436 self .priorities = {
438437 None : 0 ,
439438 'Resource Id Arguments' : 1 ,
@@ -454,7 +453,7 @@ def __init__(self, **_data):
454453 # Old attributes
455454 _data ['name' ] = _data .get ('name' , '' )
456455 _data ['text' ] = _data .get ('text' , '' )
457- super (HelpExample , self ).__init__ (_data )
456+ super ().__init__ (_data )
458457
459458 self .name = _data .get ('summary' , '' ) if _data .get ('summary' , '' ) else self .name
460459 self .text = _data .get ('command' , '' ) if _data .get ('command' , '' ) else self .text
@@ -483,11 +482,8 @@ def command(self, value):
483482
484483class HelpParameter (KnackHelpParameter ): # pylint: disable=too-many-instance-attributes
485484
486- def __init__ (self , ** kwargs ):
487- super (HelpParameter , self ).__init__ (** kwargs )
488-
489485 def update_from_data (self , data ):
490- super (HelpParameter , self ).update_from_data (data )
486+ super ().update_from_data (data )
491487 # original help.py value_sources are strings, update command strings to value-source dict
492488 if self .value_sources :
493489 self .value_sources = [str_or_dict if isinstance (str_or_dict , dict ) else {"link" : {"command" : str_or_dict }}
0 commit comments