how about changing it as this:
```
val = values
if parser.rargs and not parser.rargs[0].startswith('-'):
 val = parser.rargs[0]
 parser.rargs.pop(0)

```