All Python 3 versions supported by typeshed (3.4+) have enum as part
of the standard library.
Make the third-party Python 2 version consistent with the Python 3 version.
PR #2516 aimed to widen the accepted file argument to json.dump, but
since `IO` is invariant in its argument, it actually disallowed
passing binary files.
This function accepts the same arguments as the is_file() and is_dir()
methods in this class.
This also marks the follow_symlinks arguments to `is_dir()` and
`is_file()` as keyword only.
* Add FileWrapper protocol to wsgiref.types
* Annotate werkzeug's wrap_file and FileWrapper
* Remove empty line at end of file
* Fix _Readable protocols
This adds a few stubs that are used by absl-py, and, without them, cause
type checker errors under Pytype:
* TestCase._formatMessage
* TestCase._testMethodName
* TestCase._getAssertEqualityFunc
* TestProgram.runTests
Since Python 3.6 logging.FileHandler's filename argument can be a
PathLike object. Same for FileHandler's subclasses.
logging.basicConfig passes its filename argument to a FileHandler, so
this can be a PathLike object too.
Finally, logging.config.fileConfig passes its fname argument to
ConfigParser.read, which also takes a PathLike since version 3.6.1.
Based on the pytz docs http://pytz.sourceforge.net/ and code (version
2018.5).
- Accurately model the return value of the `timezone()` function. This
necessitates modeling the internal pytz class hierarchy which is quite
inconsistent.
- Expose `_BaseTzInfo` as `BaseTzInfo`.
This change is useful because this type is importable and otherwise
there is no pytz type which can be used in type annotations, e.g. in a
function which takes a pytz `tzinfo` with the `localize` method,
rather than a general `datetime.tzinfo`.
- Remove the lazy.pyi stubs. The `lazy` module contains some unrelated
general data structures. It is not a public API - it is not documented
and the types are not included in `__all__`.
- Remove methods which are already specified by inheritance in
`datetime.tzinfo`.
- Add several public exception classes.
- Fill in the generic type parameters of the exposed `Dict`/`List`
constants. Also change `Dict` -> `Mapping` because it is not actually
a proper `dict`.
- Some style/ordering improvements.