Exemplo n.º 1
0
def ParseOilCmdVal(spec_name, cmd_val):
    # type: (str, cmd_value__Argv) -> Tuple[args._Attributes, args.Reader]
    """Parse argv using a given FlagSpecAndMore."""
    arg_r = args.Reader(cmd_val.argv, spids=cmd_val.arg_spids)
    arg_r.Next()  # move past the builtin name

    spec = OIL_SPEC[spec_name]
    return args.ParseOil(spec, arg_r), arg_r
 def Parse(self, arg_r):
     # type: (args.Reader) -> Tuple[args._Attributes, int]
     return args.ParseOil(self, arg_r)
Exemplo n.º 3
0
 def Parse(self, arg_r):
     # type: (args.Reader) -> args._Attributes
     return args.ParseOil(self, arg_r)
Exemplo n.º 4
0
def ParseOil(spec_name, arg_r):
    # type: (str, args.Reader) -> args._Attributes
    """Parse argv using a given FlagSpec."""
    spec = OIL_SPEC[spec_name]
    return args.ParseOil(spec, arg_r)