* Move routes stubs to @python2 directory
* Ignore Python-2-only stubs for stubtest
* Use standard idiom for re-exporting items
Co-authored-by: Akuli <akuviljanen17@gmail.com>
The "jwt" package on PyPI is actually a different, incompatible package,
called python-jwt. Fix the name, so that the package name is corrected
from types-jwt to types-PyJWT, matching the upstream name.
* pyright: disable reportUnknownParameterType
Unknown parameter types are preferred over Any annotations for
incomplete stubs. Especially larger stubs are expected to be
incomplete for some time and it would be a shame to lose the
other pyright warnings for those stubs.
* Also disable reportUnknownVariableType
Fix problems with tkinter
* Disable reportUnknownMemberType
Fix pyright problems
* Extract _socket.pyi from socket.pyi.
* Extract _socket.socket from socket.socket.
* Fix socket.family annotation.
* Annotate SocketIO properly.
* SocketType is an alias of _socket.socket.
* Sort items in socket.pyi in the same order as in socket.py.
* Remove socket.EINTR.
* Use _typeshed.WriteableBuffer instead of custom alias.
* Add errorTab (Windows only).
* Add _socket.dup().
* Mark positional-only argments.
* Remove constructors from socket exceptions.
* socket.timeout is an alias for TimeoutError, starting with Python 3.10.
* Use PEP 604 in changed lines.
* Add alias for fileno arguments.
* getaddrinfo() port can be bytes.
* Explicitly override some SSLSocket methods.
* Allow ReadableBuffer in _CMSG arguments.
* Replace all uses of StrPath, BytesPath, and AnyPath in Python 2 stubs.
* Add StrOrBytesPath as preferred alias for AnyPath.
* Replace all remaining AnyPath instances with StrOrBytesPath.
* Mark AnyPath as obsolete.
Part of #5470
The method returns a tuple of io.BytesIO objects that hold the temporary
stdin and stdout. By correcting the type, it allows usages of
io.BytesIO.getvalue() to pass type checking.
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Sequence was unnecessarily specific and prevents numpy type stubs from working with this package. Numpy ndarray isn't compatible with Sequence since it doesn't have __reversed__ method.