pySim-shell, cosmetic: define positional arguments last

When we define command arguments using the ArgumentParser, we sometimes
define the positional arguments first. However, since positional arguments
usually follow after the optional (--xyz) arguments, we should define the
positional arguments last.

Related: OS#6531
Change-Id: I2412eb6e7dc32ae95a575f31d4489ce210d85ea0
This commit is contained in:
Philipp Maier
2024-08-22 11:05:06 +02:00
parent edf266726d
commit d5943934a5
4 changed files with 14 additions and 14 deletions

View File

@@ -503,8 +503,8 @@ class CardApplicationISDR(pySim.global_platform.CardApplicationSD):
self._cmd.poutput_json(flatten_dict_lists(d['get_euicc_data']))
set_nickname_parser = argparse.ArgumentParser()
set_nickname_parser.add_argument('ICCID', help='ICCID of the profile whose nickname to set')
set_nickname_parser.add_argument('--profile-nickname', help='Nickname of the profile')
set_nickname_parser.add_argument('ICCID', help='ICCID of the profile whose nickname to set')
@cmd2.with_argparser(set_nickname_parser)
def do_set_nickname(self, opts):