|
|
@ -165,9 +165,7 @@ class ArgumentSet(object): |
|
|
|
parsed = {} |
|
|
|
|
|
|
|
flags = {i.name: i for i in self.args if i.flag} |
|
|
|
if not flags: |
|
|
|
return parsed |
|
|
|
|
|
|
|
if flags: |
|
|
|
new_rawargs = [] |
|
|
|
|
|
|
|
for offset, raw in enumerate(rawargs): |
|
|
@ -179,6 +177,7 @@ class ArgumentSet(object): |
|
|
|
new_rawargs.append(raw) |
|
|
|
|
|
|
|
rawargs = new_rawargs |
|
|
|
|
|
|
|
for index, arg in enumerate((arg for arg in self.args if not arg.flag)): |
|
|
|
if not arg.required and index + arg.true_count > len(rawargs): |
|
|
|
continue |
|
|
|