* Mark SMTP attibutes with class defaults with "= ..."
* Add SMTP.command_encoding
* Annotate SMTP.__exit__()
* Add SMTP.auth() et al.
* Add LMTP_PORT constant
* 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
* Add ExcInfo and OptExcInfo type aliases
* Implement StartResponse using a protocol
* Mark stub-only types with an underscore
* Remove wrong TODO note
python/mypy#1178 is about variable-length tuples, while exc_info()
always returns a tuple with length 3. Ideally, exc_info() would
return Union[Tuple[Type[_E], _E, TracebackType], Tuple[None, None, None]],
but that is a different issue.
StartResponse callbacks are required to accept and optional third argument.
Currently, there is no good way to describe this using type hints.
Previously, a Union was used, but that causes mypy to complain about any call
of start_response().
It seems that code using HTTPError previously worked by accident
because we used to accept arbitrary keyword arguments when
instantiating BaseException, or any subclass of BaseException
(see https://github.com/python/typeshed/pull/2348).
This commit adds in the correct constructor (which also lets the
user specify the arguments in keyword-argument form).
Note: I'm not very familiar with the urllib libraries, so I opted
to just add the signature and leave it up to somebody else to
fill in the types.
pathlib2 is the Python 2.7 backport of the pathlib module from Python 3.
Hence we use the same stub file for both.
The maintainer of pathlib2 granted permission for stubs to be added in
mcmtroffaes/pathlib2#44.
`curses.wrapper` returns the return value of the function it is passed,
but its function argument is declared as `Callable[..., Any]` while its
return type is `None`. This changes the definition of `curses.wrapper`
to use a `TypeVar` that relates the return type of its function argument
to its own return type.
* Use Tuple field in DecimalTuple
* Remove unnecessary base classes from Decimal
* Decimal.__init__ -> __new__
* Decimal.__ne__ is not defined in Python 3
* Add Decimal.as_integer_ratio()
* Annotate DecimalException.handle()
* Correct types of Decimal method arguments
* Add missing arguments and optional markers to Decimal
* Add missing arguments to Context
* Remove spurious int from Unions with float
* Remove Context.__setattr__()
* Fix return types of Context methods