Commit Graph

8 Commits

Author SHA1 Message Date
Akuli
ee487304d7 Big diff: Use new "|" union syntax (#5872) 2021-08-08 11:05:21 +02:00
Anton Grübel
96e0660fba Use _typeshed.Self with __enter__ (#5717)
Co-authored-by: Akuli <akuviljanen17@gmail.com>
2021-07-01 12:32:32 +02:00
Sebastian Rittau
6ee67483a3 Rework socket (#5545)
* 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.
2021-05-30 20:17:33 +02:00
Sebastian Rittau
6a9c89e928 Replace 'Text' with 'str' in py3 stdlib (#5466) 2021-05-16 07:10:48 -07:00
Akuli
17dcea4a68 Akuli and srittau: Remove Python 2 branches from Python 3 stubs (#5461)
* run script and do some manual changes (Akuli)

* do the whole thing manually (srittau)

* merge changes (Akuli)

Co-authored-by: Sebastian Rittau <srittau@rittau.biz>
2021-05-15 15:33:39 +03:00
hatal175
b8e5f637b9 Stubtest fixes (#5391) 2021-05-13 18:20:55 -07:00
Eric Traut
0ec182227c Added a few missing type arguments for generic types used in stdlib stubs
I just found and fixed a bug in pyright's "missing type arguments" check. When type arguments were omitted for a generic type within a subscript expression, the error was being suppressed. With this bug fixed, I found several new cases where type arguments were missing in stdlib stubs. (#5130)

Co-authored-by: Eric Traut <erictr@microsoft.com>
2021-03-22 18:28:04 -07:00
Ivan Levkivskyi
16ae4c6120 Re-organize directory structure (#4971)
See discussion in #2491

Co-authored-by: Ivan Levkivskyi <ilevkivskyi@dropbox.com>
2021-01-27 12:00:39 +00:00