* optparse.Option.dest is a string
* optparse.OptionParser.epilog is a string
* optparse.OptionParser.prog is string
* optparse.OptionParser.values is Values
Shuffle code to resolve forward reference
* optparse.OptionParser.*option_list is a list of Options
* optparse.OptionParser.parse_args returns 2-tuple
<https://docs.python.org/2/library/optparse.html#parsing-arguments>
* minor improvements to Values
optparse.Values is like argparse.Namespace and also has a __getattr__() method to return the parsed options.
Apply commits 54b4983 and 9ae0c0b from python/typeshed#25
* Change Uses of List[] to Sequence[] in argument positions.
One of these (parse_args()) broke in real-world code, because the
expected type was List[Union[str, bytes]] but the actual type was
List[str] (because List is invariant). That is ridiculous, so I
changed the accepted type to Sequence[_Text] which is covariant. Then
I found a few other methods/functions that probably should also be
changed to Sequence, but I'm less certain of those. I'm not at all
sure about the instance/class attributes, so I left those alone
(though I suspect those might also have to switch).
* Fixes suggested by code review
- Changed Sequence[Option] to Iterable[Option] everywhere
- Changed _process_args to plain List