Sebastian Rittau
40b127d46a
Add third-party commonmark stubs ( #5702 )
2021-06-30 07:19:43 -07:00
kasium
2c97c3cab9
Flag LogRecord.args as optional ( #5714 )
...
Resolves #5710
2021-06-30 14:51:32 +02:00
Sebastian Rittau
f260ea2383
Add html5lib third-party stubs ( #5701 )
2021-06-29 21:15:59 -07:00
Jake Bailey
bb981bd726
Merge last of PIL stubs from Pylance ( #5706 )
...
Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com >
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com >
2021-06-29 21:05:04 -07:00
Anton Grübel
c38171a0b3
Use _typeshed.Self with __enter__ ( #5712 )
2021-06-29 15:19:25 -07:00
Anton Grübel
35cc7491db
Add __defaults__ and __closure__ to types.MethodType ( #5707 )
2021-06-29 10:21:06 -07:00
Thomas Grainger
bd50dacd76
add py3.10 async contextlib.nullcontext ( #5711 )
2021-06-29 08:35:44 -07:00
Charly C
389b92cb04
fix the stub files for the stdlib mmap module ( #5705 )
...
In Python 3:
- The `mmap` type is `Iterable[int]`, not `Iterable[bytes]`.
- The `read_byte` method returns an `int`, and the `write_byte` method only accepts an `int` as its first and only argument.
- The `__setitem__` method accepts any `ReadableBuffer` object, not just `bytes`.
In both Python 2 and 3:
- The `__delitem__` method always raises a `TypeError`, so the proper return type is `NoReturn`.
- The `mmap` type isn't generic, so I've simplified the stubs by removing the unnecessary `_mmap` class.
2021-06-29 08:01:32 -07:00
Thomas Grainger
14add7520b
widen _SupportsAclose ( #5708 )
...
see https://github.com/python-trio/trio-typing/issues/31#issuecomment-867534826
2021-06-28 15:29:21 -07:00
Sebastian Rittau
2b64f54008
Support @tests/requirements-stubtest.txt files ( #5704 )
2021-06-28 19:42:27 +02:00
Jake Bailey
6b8f047b05
Update some PIL stubs ( #5692 )
...
Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com >
Co-authored-by: Akuli <akuviljanen17@gmail.com >
2021-06-28 10:29:17 -07:00
Jelle Zijlstra
14d7431ff1
Recommend Self in CONTRIBUTING.md ( #5699 )
...
Part of #5676 .
Co-authored-by: Akuli <akuviljanen17@gmail.com >
2021-06-27 23:17:28 +03:00
Dominic Davis-Foster
58559e56b3
Use _typeshed.Self where __enter__ returns self ( #5698 )
2021-06-27 22:58:58 +03:00
github-actions[bot]
1fb100dca4
Remove unused stubtest allowlist entries ( #5697 )
...
Co-authored-by: hauntsaninja <hauntsaninja@users.noreply.github.com >
2021-06-26 21:28:00 -07:00
Bas van Beek
50f5858a56
Use SupportsIndex where applicable for 5 classes ( #5694 )
...
Use `SupportsIndex` where applicable:
* `str`
* `bytes`
* `bytearray`
* `memoryview`
* `markupsafe.Markup`
2021-06-26 19:05:40 +03:00
Thomas Grainger
c522e8e53c
contextlib.nullcontext is a class ( #5695 )
...
Co-authored-by: Akuli <akuviljanen17@gmail.com >
2021-06-26 08:19:03 -07:00
JHeilCoveo
64c85cdd44
Fix cachetools decorators ( #5690 )
2021-06-25 08:45:42 -07:00
Jelle Zijlstra
5fe2459779
Make SigParameter.replace and Signature.replace return Self ( #5689 )
2021-06-24 18:01:58 +02:00
Thomas Grainger
2cd7e6511b
fix abcmeta.ABCMeta type ( #5688 )
...
Add __abstractmethods__, __instancecheck__ and __subclasscheck__
Co-authored-by: Akuli <akuviljanen17@gmail.com >
2021-06-24 16:56:09 +03:00
Maximilian Hils
f58c9c7e7d
Extend pyOpenSSL stubs ( #5687 )
2021-06-24 12:21:05 +02:00
Sebastian Rittau
bda76bb7d8
Re-add python2 keys to METADATA temporarily ( #5686 )
2021-06-24 00:48:05 +02:00
Jake Bailey
96429cd4bd
Update pyright to 1.1.152 ( #5685 )
2021-06-24 00:11:33 +02:00
Sebastian Rittau
dd441645ad
Make logging.StreamHandler generic over stream ( #5681 )
...
Closes #5680
2021-06-23 17:03:18 +03:00
Sebastian Rittau
816a92b8e8
Add Self type var to _typeshed ( #5677 )
...
Cf. #5676
2021-06-22 22:15:27 +02:00
Jelle Zijlstra
73b4c21cce
Make ZipFile.__enter__ return self ( #5675 )
2021-06-22 17:01:11 +02:00
Sebastian Rittau
3ec061022a
Improve logging.StreamHandler and FileHandler ( #5663 )
...
* Use PEP 604, instead of Optional.
* Override FileHandler.stream and setStream to require a TextIOWrapper
instead of a SupportsWrite object.
* FileHandler._open() now returns a TextIOWrapper instead of IO. Using
anything but a file opened in text mode would not work.
2021-06-21 22:50:49 +02:00
Akuli
11b99e1141
@python2 nits ( #5672 )
...
* tiny tests/mypy_test.py cleanup
* try to make CONTRIBUTING.md less confusing
2021-06-21 21:42:45 +03:00
Sebastian Rittau
68dc2d132b
Move Python 2-only stubs to @python2 directory ( #5660 )
2021-06-21 11:28:25 -07:00
Sebastian Rittau
a319ba4604
pkg_resources is part of setuptools ( #5669 )
2021-06-21 15:19:18 +01:00
Sebastian Rittau
b1ef60c9d5
Update a few stub versions ( #5670 )
2021-06-21 07:15:00 -07:00
nzig
679ddde66e
Add replace parameter for redis restore ( #5668 )
2021-06-21 09:50:06 +02:00
Sebastian Rittau
9ec2f87124
Copy args from json.loads() to requests.Response.json() ( #5664 )
2021-06-20 07:21:20 -07:00
Sebastian Rittau
67087721c5
Update mypy and black ( #5665 )
2021-06-20 07:14:56 -07:00
nzig
962a6fd387
Add replace parameter for redis restore ( #5662 )
...
Co-authored-by: Nadav Zingerman <nadav@medigate.io >
2021-06-20 14:01:03 +02:00
Sebastian Rittau
bc2ec748f6
Move routes stubs to @python2 directory ( #5637 )
...
* 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 >
2021-06-18 17:05:23 +03:00
layday
5a256a0c70
Fix sysconfig.get_path return type ( #5659 )
...
`get_path` uses key access and raises `KeyError` for missing keys.
2021-06-18 12:45:23 +02:00
Vasily Zakharov
4d981f87e3
FixpyOpenSSL stubs to pass stubtest ( #5657 )
...
* Fix missing default arguments.
* Fix wrong argument names.
* Add constructor to `_EllipticCurve` and remove `name`.
2021-06-17 23:02:35 +02:00
Akuli
c5b59b9e41
Pymysql cursor types and fetching return types ( #5652 )
...
version update: stubs made based on pymysql 1.0.2
2021-06-17 20:53:22 +02:00
Sebastian Rittau
64f463172b
bleach: Loosen attribute dict type ( #5651 )
...
Closes : #5650
2021-06-17 12:53:16 +02:00
Akuli
515aa6fa3d
pymysql: query arguments can be any value ( #5653 )
2021-06-17 11:02:37 +02:00
Thomas Grainger
74091411ea
widen contextlib._SupportsClose and _SupportsAclose ( #5655 )
2021-06-17 11:58:49 +03:00
Maarten ter Huurne
0d9521970d
Mark enum.Flag.name as Optional[str] ( #5611 )
...
* Mark enum.Flag.name as Optional[str]
* Annotate enum.Flag.value
2021-06-16 19:25:47 +03:00
Sebastian Rittau
a98fceca2f
Rename openssl-python to pyOpenSSL ( #5649 )
...
Remove stubtest allowlist
Set package version
2021-06-16 08:22:45 -07:00
Vasily Zakharov
ff75793531
Improve OpenSSL stubs ( #5645 )
...
* Support Python 3.
* Add OpenSSL.SSL.
* Extend OpenSSL.crypto.
Co-authored-by: Vasily Zakharov <v.zakharov@wwpass.com >
2021-06-16 16:54:30 +02:00
Jelle Zijlstra
e58070cd35
socket: allow ReadableBuffer on send* methods ( #5648 )
2021-06-16 15:36:56 +02:00
Sebastian Speitel
04d81a8499
Allow merging dicts of different types ( #5520 )
2021-06-16 06:03:15 -07:00
Oleg Höfling
725b5ef71b
Loosen mapping as input type in mapping representer ( #5644 )
...
Signed-off-by: oleg.hoefling <oleg.hoefling@gmail.com >
2021-06-16 12:05:43 +02:00
Oleg Höfling
5a1dbf7cee
loosen type restrictions for mapping representer input ( #5640 )
...
Signed-off-by: oleg.hoefling <oleg.hoefling@gmail.com >
2021-06-15 15:35:12 +02:00
joooeey
3072046430
Add Python 3.9 support in logging.basicConfig ( #5639 )
2021-06-15 11:33:38 +02:00
Marius Gedminas
524947dbdc
Fix incorrect markupsafe.Markup return types ( #5638 )
...
Closes #5632 .
2021-06-15 10:02:33 +02:00