From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by mx.groups.io with SMTP id smtpd.web10.83.1573079992831490407 for ; Wed, 06 Nov 2019 14:39:52 -0800 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 134.134.136.20, mailfrom: ashley.e.desimone@intel.com) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 06 Nov 2019 14:39:52 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.68,275,1569308400"; d="scan'208";a="205481892" Received: from aedesimo-desk.amr.corp.intel.com ([10.7.159.171]) by orsmga003.jf.intel.com with ESMTP; 06 Nov 2019 14:39:51 -0800 From: "Desimone, Ashley E" To: devel@edk2.groups.io Cc: Nate DeSimone , Puja Pandya Subject: [edk2-devel][edk2-staging/EdkRepo][PATCH v2 8/8] EdkRepo: Argument Strings Refactor - EdkRepo Command Date: Wed, 6 Nov 2019 14:39:44 -0800 Message-Id: <20191106223944.18036-8-ashley.e.desimone@intel.com> X-Mailer: git-send-email 2.16.2.windows.1 In-Reply-To: <20191106223944.18036-1-ashley.e.desimone@intel.com> References: <20191106223944.18036-1-ashley.e.desimone@intel.com> Move all argument strings for edkrepo_command.py to edkrepo/commands/arguments/edkrepo_cmd_args.py Signed-off-by: Ashley E Desimone Cc: Nate DeSimone Cc: Puja Pandya --- .../arguments/edkrepo_cmd_args.py} | 9 +++------ edkrepo/commands/edkrepo_command.py | 16 ++++++---------- 2 files changed, 9 insertions(+), 16 deletions(-) rename edkrepo/{common/argument_strings.py => commands/arguments/edkrepo_cmd_args.py} (65%) diff --git a/edkrepo/common/argument_strings.py b/edkrepo/commands/arguments/edkrepo_cmd_args.py similarity index 65% rename from edkrepo/common/argument_strings.py rename to edkrepo/commands/arguments/edkrepo_cmd_args.py index 75e13ee..f2d7eb6 100644 --- a/edkrepo/common/argument_strings.py +++ b/edkrepo/commands/arguments/edkrepo_cmd_args.py @@ -7,15 +7,12 @@ # SPDX-License-Identifier: BSD-2-Clause-Patent # -'''Contains help and description strings for arguments in command meta data.''' +'''Contains help and description strings for arguments in the edkrepo_command +meta data. +''' -#Args for edk_command.py -VERBOSE_DESCRIPTION = 'Enable verbose output' VERBOSE_HELP = 'Increases command verbosity' -DRY_RUN_DESCRIPTION = "Don't actually do anything" DRY_RUN_HELP = "Don't actually do anything" OVERRIDE_HELP = 'Ignore warnings' SUBMODULE_SKIP_HELP = 'Skip the pull or sync of any submodules.' COLOR_HELP = 'Force color output (useful with \'less -r\')' - - diff --git a/edkrepo/commands/edkrepo_command.py b/edkrepo/commands/edkrepo_command.py index 75b6f35..f69bdb8 100644 --- a/edkrepo/commands/edkrepo_command.py +++ b/edkrepo/commands/edkrepo_command.py @@ -7,9 +7,7 @@ # SPDX-License-Identifier: BSD-2-Clause-Patent # -# Our modules -from edkrepo.common.argument_strings import VERBOSE_DESCRIPTION, VERBOSE_HELP, DRY_RUN_DESCRIPTION, DRY_RUN_HELP, COLOR_HELP -from edkrepo.common.argument_strings import OVERRIDE_HELP, SUBMODULE_SKIP_HELP +import edkrepo.commands.arguments.edkrepo_cmd_args as arguments class EdkrepoCommand(object): @@ -25,30 +23,28 @@ VerboseArgument = {'name': 'verbose', 'short-name': 'v', 'positional': False, 'required': False, - 'description': VERBOSE_DESCRIPTION , - 'help-text': VERBOSE_HELP} + 'help-text': arguments.VERBOSE_HELP} DryRunArgument = {'name': 'dry-run', 'positional': False, 'required': False, - 'description': DRY_RUN_DESCRIPTION, - 'help-text': DRY_RUN_HELP} + 'help-text': arguments.DRY_RUN_HELP} OverrideArgument = {'name': 'override', 'short-name': 'o', 'positional': False, 'required': False, - 'help-text': OVERRIDE_HELP} + 'help-text': arguments.OVERRIDE_HELP} ColorArgument = {'name' : 'color', 'short-name': 'c', 'positional' : False, 'required' : False, - 'help-text' : COLOR_HELP} + 'help-text' : arguments.COLOR_HELP} SubmoduleSkipArgument = {'name': 'skip-submodule', 'short-name' : 's', 'positional' : False, 'required' : False, - 'help-text' : SUBMODULE_SKIP_HELP} + 'help-text' : arguments.SUBMODULE_SKIP_HELP} -- 2.16.2.windows.1