Пример #1
0
    def prepare_args(self):
        # replace some args from dict substitutions
        self.args = map(lambda x: substitutions.get(x, x), self.args)
        # move --json and --debug flags before any action
        for flag in self.universal_flags:
            if flag in self.args:
                self.args.remove(flag)
                self.args.insert(1, flag)

        self.move_argument_before_action("--env", )
Пример #2
0
    def prepare_args(self):
        # replace some args from dict substitutions
        self.args = map(
            lambda x: substitutions.get(x, x),
            self.args
        )
        # move --json and --debug flags before any action
        for flag in self.universal_flags:
            if flag in self.args:
                self.args.remove(flag)
                self.args.insert(1, flag)

        self.move_argument_before_action("--env", )
Пример #3
0
    def prepare_args(self):
        # replace some args from dict substitutions
        self.args = [substitutions.get(arg, arg) for arg in self.args]

        # move general used flags before actions, otherwise they will be used
        # as a part of action by action_generator
        for flag in self.credential_flags:
            self.move_argument_before_action(flag)

        for flag in self.universal_flags:
            self.move_argument_before_action(flag, has_value=False)

        self.move_argument_after_action("--env")
Пример #4
0
    def prepare_args(self):
        # replace some args from dict substitutions
        self.args = [substitutions.get(arg, arg) for arg in self.args]

        # move general used flags before actions, otherwise they will be used
        # as a part of action by action_generator
        for flag in self.credential_flags:
            self.move_argument_before_action(flag)

        for flag in self.universal_flags:
            self.move_argument_before_action(flag, has_value=False)

        self.move_argument_after_action("--env", )