Spaces Data

Minimal test - lines (285, 319)

path: .spaces[8].spaces[5].metrics.loc.cloc
old: 2.0
new: 21.0

path: .spaces[8].spaces[5].metrics.loc.sloc
old: 15.0
new: 35.0

path: .spaces[8].spaces[5].metrics.loc.blank
old: 0.0
new: 1.0

path: .spaces[8].spaces[5].metrics.mi.mi_original
old: 95.93395576623556
new: 82.20773042796286

path: .spaces[8].spaces[5].metrics.mi.mi_sei
old: 90.11323901588754
new: 90.11270647393413

path: .spaces[8].spaces[5].metrics.mi.mi_visual_studio
old: 56.101728518266405
new: 48.074696156703425

Code

    def _process_args_for_options(self, state):
        while state.rargs:
            arg = state.rargs.pop(0)
            arglen = len(arg)
            # Double dashes always handled explicitly regardless of what
            # prefixes are valid.
            if arg == '--':
                return
            elif arg[:1] in self._opt_prefixes and arglen > 1:
                self._process_opts(arg, state)
            elif self.allow_interspersed_args:
                state.largs.append(arg)
            else:
                state.rargs.insert(0, arg)
                return

        # Say this is the original argument list:
        # [arg0, arg1, ..., arg(i-1), arg(i), arg(i+1), ..., arg(N-1)]
        #                            ^
        # (we are about to process arg(i)).
        #
        # Then rargs is [arg(i), ..., arg(N-1)] and largs is a *subset* of
        # [arg0, ..., arg(i-1)] (any options and their arguments will have
        # been removed from largs).
        #
        # The while loop will usually consume 1 or more arguments per pass.
        # If it consumes 1 (eg. arg is an option that takes no arguments),
        # then after _process_arg() is done the situation is:
        #
        #   largs = subset of [arg0, ..., arg(i)]
        #   rargs = [arg(i+1), ..., arg(N-1)]
        #
        # If allow_interspersed_args is false, largs will always be
        # *empty* -- still a subset of [arg0, ..., arg(i-1)], but
        # not a very interesting subset!