50
50
# Most of these methods override print methods in CLIHelp
51
51
class CLIPrintMixin (CLIHelp ):
52
52
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 )
54
54
55
55
links = help_file .links
56
56
if links :
@@ -61,7 +61,7 @@ def _print_header(self, cli_name, help_file):
61
61
62
62
def _print_detailed_help (self , cli_name , help_file ):
63
63
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 )
65
65
self ._print_az_find_message (help_file .command )
66
66
67
67
@staticmethod
@@ -131,12 +131,11 @@ def _print_extensions_msg(help_file):
131
131
class AzCliHelp (CLIPrintMixin , CLIHelp ):
132
132
133
133
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 )
140
139
from knack .help import HelpObject
141
140
142
141
# TODO: This workaround is used to avoid a bizarre bug in Python 2.7. It
@@ -247,7 +246,7 @@ class CliHelpFile(KnackHelpFile):
247
246
248
247
def __init__ (self , help_ctx , delimiters ):
249
248
# 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 )
251
250
self .links = []
252
251
253
252
from knack .deprecation import resolve_deprecate_info , ImplicitDeprecated , Deprecated
@@ -376,7 +375,7 @@ def load(self, options):
376
375
class CliCommandHelpFile (KnackCommandHelpFile , CliHelpFile ):
377
376
378
377
def __init__ (self , help_ctx , delimiters , parser ):
379
- super (CliCommandHelpFile , self ).__init__ (help_ctx , delimiters , parser )
378
+ super ().__init__ (help_ctx , delimiters , parser )
380
379
self .type = 'command'
381
380
self .command_source = getattr (parser , 'command_source' , None )
382
381
@@ -409,7 +408,7 @@ def __init__(self, help_ctx, delimiters, parser):
409
408
param .__class__ = HelpParameter
410
409
411
410
def _load_from_data (self , data ):
412
- super (CliCommandHelpFile , self )._load_from_data (data )
411
+ super ()._load_from_data (data )
413
412
414
413
if isinstance (data , str ) or not self .parameters or not data .get ('parameters' ):
415
414
return
@@ -433,7 +432,7 @@ class ArgumentGroupRegistry(KnackArgumentGroupRegistry): # pylint: disable=too-
433
432
434
433
def __init__ (self , group_list ):
435
434
436
- super (ArgumentGroupRegistry , self ).__init__ (group_list )
435
+ super ().__init__ (group_list )
437
436
self .priorities = {
438
437
None : 0 ,
439
438
'Resource Id Arguments' : 1 ,
@@ -454,7 +453,7 @@ def __init__(self, **_data):
454
453
# Old attributes
455
454
_data ['name' ] = _data .get ('name' , '' )
456
455
_data ['text' ] = _data .get ('text' , '' )
457
- super (HelpExample , self ).__init__ (_data )
456
+ super ().__init__ (_data )
458
457
459
458
self .name = _data .get ('summary' , '' ) if _data .get ('summary' , '' ) else self .name
460
459
self .text = _data .get ('command' , '' ) if _data .get ('command' , '' ) else self .text
@@ -483,11 +482,8 @@ def command(self, value):
483
482
484
483
class HelpParameter (KnackHelpParameter ): # pylint: disable=too-many-instance-attributes
485
484
486
- def __init__ (self , ** kwargs ):
487
- super (HelpParameter , self ).__init__ (** kwargs )
488
-
489
485
def update_from_data (self , data ):
490
- super (HelpParameter , self ).update_from_data (data )
486
+ super ().update_from_data (data )
491
487
# original help.py value_sources are strings, update command strings to value-source dict
492
488
if self .value_sources :
493
489
self .value_sources = [str_or_dict if isinstance (str_or_dict , dict ) else {"link" : {"command" : str_or_dict }}
0 commit comments