зеркало из https://github.com/microsoft/azure-cli.git
{Misc} Remove unnecessary base class method invocations (#13879)
This commit is contained in:
Родитель
12ceca8fea
Коммит
e4578aaed9
|
@ -60,12 +60,10 @@ class MyCommandsLoader(AzCommandsLoader):
|
|||
custom_command_type=mymod_custom)
|
||||
|
||||
def load_command_table(self, args):
|
||||
super(MyCommandsLoader, self).load_command_table(args)
|
||||
# TODO: Register command groups and commands here
|
||||
return self.command_table
|
||||
|
||||
def load_arguments(self, command):
|
||||
super(MyCommandsLoader, self).load_arguments(command)
|
||||
# TODO: Register argument contexts and arguments here
|
||||
|
||||
COMMAND_LOADER_CLS = MyCommandsLoader
|
||||
|
|
|
@ -170,7 +170,6 @@ class TestCommandRegistration(unittest.TestCase):
|
|||
class TestCommandsLoader(AzCommandsLoader):
|
||||
|
||||
def load_command_table(self, args):
|
||||
super(TestCommandsLoader, self).load_command_table(args)
|
||||
with self.command_group('hello', operations_tmpl='{}#TestCommandRegistration.{{}}'.format(__name__)) as g:
|
||||
g.command('mod-only', 'sample_vm_get')
|
||||
g.command('overridden', 'sample_vm_get')
|
||||
|
@ -180,7 +179,6 @@ class TestCommandRegistration(unittest.TestCase):
|
|||
class Test2CommandsLoader(AzCommandsLoader):
|
||||
# An extra group that is not loaded if a module is found from the index
|
||||
def load_command_table(self, args):
|
||||
super(Test2CommandsLoader, self).load_command_table(args)
|
||||
with self.command_group('extra', operations_tmpl='{}#TestCommandRegistration.{{}}'.format(__name__)) as g:
|
||||
g.command('unused', 'sample_vm_get')
|
||||
self.__module__ = "azure.cli.command_modules.extra"
|
||||
|
@ -190,7 +188,6 @@ class TestCommandRegistration(unittest.TestCase):
|
|||
class ExtCommandsLoader(AzCommandsLoader):
|
||||
|
||||
def load_command_table(self, args):
|
||||
super(ExtCommandsLoader, self).load_command_table(args)
|
||||
with self.command_group('hello', operations_tmpl='{}#TestCommandRegistration.{{}}'.format(__name__)) as g:
|
||||
g.command('ext-only', 'sample_vm_get')
|
||||
self.__module__ = "azext_hello1"
|
||||
|
@ -200,7 +197,6 @@ class TestCommandRegistration(unittest.TestCase):
|
|||
class Ext2CommandsLoader(AzCommandsLoader):
|
||||
|
||||
def load_command_table(self, args):
|
||||
super(Ext2CommandsLoader, self).load_command_table(args)
|
||||
with self.command_group('hello', operations_tmpl='{}#TestCommandRegistration.{{}}'.format(__name__)) as g:
|
||||
g.command('overridden', 'sample_vm_get')
|
||||
self.__module__ = "azext_hello2"
|
||||
|
|
|
@ -16,13 +16,11 @@ class MediaServicesCommandsLoader(AzCommandsLoader):
|
|||
super(MediaServicesCommandsLoader, self).__init__(cli_ctx=cli_ctx, resource_type=ResourceType.MGMT_MEDIA)
|
||||
|
||||
def load_command_table(self, args):
|
||||
super(MediaServicesCommandsLoader, self).load_command_table(args)
|
||||
from azure.cli.command_modules.ams.commands import load_command_table
|
||||
load_command_table(self, args)
|
||||
return self.command_table
|
||||
|
||||
def load_arguments(self, command):
|
||||
super(MediaServicesCommandsLoader, self).load_arguments(command)
|
||||
from azure.cli.command_modules.ams._params import load_arguments
|
||||
load_arguments(self, command)
|
||||
|
||||
|
|
|
@ -25,13 +25,11 @@ class BatchCommandsLoader(AzCommandsLoader):
|
|||
self.module_name = __name__
|
||||
|
||||
def load_command_table(self, args):
|
||||
super(BatchCommandsLoader, self).load_command_table(args)
|
||||
from azure.cli.command_modules.batch.commands import load_command_table
|
||||
load_command_table(self, args)
|
||||
return self.command_table
|
||||
|
||||
def load_arguments(self, command):
|
||||
super(BatchCommandsLoader, self).load_arguments(command)
|
||||
from azure.cli.command_modules.batch._params import load_arguments
|
||||
load_arguments(self, command)
|
||||
|
||||
|
|
|
@ -19,13 +19,11 @@ class CdnCommandsLoader(AzCommandsLoader):
|
|||
custom_command_type=cdn_custom)
|
||||
|
||||
def load_command_table(self, args):
|
||||
super(CdnCommandsLoader, self).load_command_table(args)
|
||||
from azure.cli.command_modules.cdn.commands import load_command_table
|
||||
load_command_table(self, args)
|
||||
return self.command_table
|
||||
|
||||
def load_arguments(self, command):
|
||||
super(CdnCommandsLoader, self).load_arguments(command)
|
||||
from azure.cli.command_modules.cdn._params import load_arguments
|
||||
load_arguments(self, command)
|
||||
|
||||
|
|
|
@ -18,13 +18,11 @@ class NetAppFilesCommandsLoader(AzCommandsLoader):
|
|||
custom_command_type=netappfiles_custom)
|
||||
|
||||
def load_command_table(self, args):
|
||||
super(NetAppFilesCommandsLoader, self).load_command_table(args)
|
||||
from azure.cli.command_modules.netappfiles.commands import load_command_table
|
||||
load_command_table(self, args)
|
||||
return self.command_table
|
||||
|
||||
def load_arguments(self, command):
|
||||
super(NetAppFilesCommandsLoader, self).load_arguments(command)
|
||||
from azure.cli.command_modules.netappfiles._params import load_arguments
|
||||
load_arguments(self, command)
|
||||
|
||||
|
|
|
@ -22,13 +22,11 @@ class StorageCommandsLoader(AzCommandsLoader):
|
|||
argument_context_cls=StorageArgumentContext)
|
||||
|
||||
def load_command_table(self, args):
|
||||
super(StorageCommandsLoader, self).load_command_table(args)
|
||||
from azure.cli.command_modules.storage.commands import load_command_table
|
||||
load_command_table(self, args)
|
||||
return self.command_table
|
||||
|
||||
def load_arguments(self, command):
|
||||
super(StorageCommandsLoader, self).load_arguments(command)
|
||||
from azure.cli.command_modules.storage._params import load_arguments
|
||||
load_arguments(self, command)
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче