Jelle Zijlstra and GitHub
80591d9f99
Fix aiofiles.base.AsyncBase.__iter__ ( #5750 )
...
Fixes #5725 .
This doesn't actually work properly in mypy.
2021-07-11 10:58:10 +03:00
Nipunn Koorapati and GitHub
42eec29eed
Update proto stubs with latest mypy-protobuf 2.6 ( #5753 )
2021-07-10 17:10:39 -07:00
Nipunn Koorapati and GitHub
276c225cd9
Remove FieldDescriptor fallback for protobuf extension methods ( #5754 )
...
It was there for compatibility to older versions of mypy-protobuf.
With modular typeshed, this sort of straddling code will no longer
be necessary! Thanks @ilevkivskyi
2021-07-11 00:28:46 +02:00
Sebastian Rittau and GitHub
8d12d6f468
Use vobject stubs in caldav ( #5749 )
2021-07-09 16:57:16 +03:00
Bas van Beek and GitHub
5e23e2c19a
Use SupportsIndex where applicable in builtins.pyi ( #5739 )
...
* Use `SupportsIndex` where applicable in `builtins.pyi`
* Remove `None` from the `int.__round__` ndigits parameter
2021-07-09 13:08:19 +03:00
0330530de0
Update pwd stub file ( #5741 )
...
Add the following properties to struct_passwd:
* n_fields
* n_sequence_fields
* n_unnamed_fields
Co-authored-by: Akuli <akuviljanen17@gmail.com >
2021-07-09 12:54:22 +03:00
c4a60ce94c
Add pytest-lazyfixture stubs ( #5745 )
...
This change will add stubs for pytest-lazyfixture. It is particual useful for projects which type their tests and use pytest-lazyfixture.
The included functions and classes are the scope which can be considered documented by the module. Any other function is related to pytest hook implementations and are normally not called by an user.
Please note, that if a user uses 'pytest.lazy_fixture' these stubs will not work. As recommneded in https://github.com/TvoroG/pytest-lazy-fixture/issues/51 the package needs to imported directly.
Co-authored-by: Akuli <akuviljanen17@gmail.com >
2021-07-09 12:52:22 +03:00
Sebastian Rittau and GitHub
aca5952361
Wrap vobject.win32tz in platform check ( #5747 )
2021-07-09 11:32:57 +02:00
Nipunn Koorapati and GitHub
c5dd23ac0d
Allow unicode and bytes in EnumTypeWrapper.Value ( #5743 )
2021-07-09 11:22:38 +02:00
fdf073627c
maybe fix stubtest ( #5746 )
...
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com >
2021-07-09 12:06:26 +03:00
Sebastian Rittau and GitHub
a7446632f7
Add third-party vobject stubs ( #5733 )
2021-07-08 18:26:24 -07:00
Sebastian Rittau and GitHub
788b20e326
Upgrade Pillow stubs for Pillow 8.3 ( #5731 )
...
* Upgrade Pillow stubs for Pillow 8.3
* stubtest: ignore PIL._tkinter_finder
* Annotate TiffTags.py
* Pillow: stubtest and various other fixes
* Remove tkinter modules from stubtest_allowlist
2021-07-08 18:22:07 -07:00
c968614bae
fix type of FileIO.__init__ opener kwarg ( #5738 )
...
Co-authored-by: Akuli <akuviljanen17@gmail.com >
2021-07-08 13:50:56 -07:00
Anton Grübel and GitHub
0085539df3
Add missing type hints in http.client ( #5734 )
...
* Add missing type hints in http.client
* Add http.client.HTTPConnection.response_class to exclude list
2021-07-08 14:43:42 +03:00
opsyne and GitHub
9d5046ee7f
polib: fix ordered_metadata return type ( #5735 )
...
Also update version in METADATA.toml.
2021-07-07 19:07:17 +02:00
Akuli and GitHub
42247feefb
use Self in async context managers ( #5724 )
2021-07-06 08:47:49 +02:00
Peter Pentchev and GitHub
ff2b92f340
pathlib2: most of the methods support the "unicode" type. ( #5727 )
...
Closes : #5726
2021-07-05 12:47:18 +02:00
Unrud and GitHub
2ee7b1346b
Replace IO[str] with IO[bytes] in urllib.request ( #5728 )
2021-07-05 09:41:59 +02:00
Josh and GitHub
2b497f7227
importlib.util.resolve_name package argument accepts None ( #5730 )
2021-07-05 09:21:40 +02:00
d68701c0ec
Use _typeshed.Self with __enter__ ( #5723 )
...
Co-authored-by: Sebastian Rittau <srittau@rittau.biz >
Co-authored-by: Akuli <akuviljanen17@gmail.com >
2021-07-04 21:10:01 +03:00
Fabian Raab and GitHub
1a131a489e
[UserList]: Return type for slice is set to whatever self is ( #5722 )
2021-07-02 21:20:17 +02:00
Anton Grübel and GitHub
de19554dcc
Add json.py_encode_basestring stubs ( #5720 )
2021-07-02 11:18:35 +03:00
Anton Grübel and GitHub
8a107464a8
Use _typeshed.Self with __enter__ ( #5719 )
2021-07-01 23:15:13 +02:00
96e0660fba
Use _typeshed.Self with __enter__ ( #5717 )
...
Co-authored-by: Akuli <akuviljanen17@gmail.com >
2021-07-01 12:32:32 +02:00
Shantanu and GitHub
04f0113d16
dataclasses: work around default factory issues ( #5718 )
2021-07-01 08:07:00 +02:00
Luis Marsano and GitHub
c6b78354e6
stdlib logging: specify style type as literal choice ( #5716 )
...
documented for style parameter: https://docs.python.org/3/library/logging.html#logging.Formatter
2021-06-30 14:50:21 -07:00
Akuli and GitHub
b06352556d
Use Literal["little", "big"] for byteorder ( #5715 )
2021-06-30 13:15:50 -07:00
Sebastian Rittau and GitHub
1cffceb767
Add httplib2 third-party stubs ( #5713 )
2021-06-30 07:54:02 -07:00
2b35ea5f91
Add caldav third-party stubs ( #5684 )
...
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com >
2021-06-30 16:28:40 +02:00
Sebastian Rittau and GitHub
40b127d46a
Add third-party commonmark stubs ( #5702 )
2021-06-30 07:19:43 -07:00
kasium and GitHub
2c97c3cab9
Flag LogRecord.args as optional ( #5714 )
...
Resolves #5710
2021-06-30 14:51:32 +02:00
Sebastian Rittau and GitHub
f260ea2383
Add html5lib third-party stubs ( #5701 )
2021-06-29 21:15:59 -07:00
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 and GitHub
c38171a0b3
Use _typeshed.Self with __enter__ ( #5712 )
2021-06-29 15:19:25 -07:00
Anton Grübel and GitHub
35cc7491db
Add __defaults__ and __closure__ to types.MethodType ( #5707 )
2021-06-29 10:21:06 -07:00
Thomas Grainger and GitHub
bd50dacd76
add py3.10 async contextlib.nullcontext ( #5711 )
2021-06-29 08:35:44 -07:00
Charly C and GitHub
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 and GitHub
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 and GitHub
2b64f54008
Support @tests/requirements-stubtest.txt files ( #5704 )
2021-06-28 19:42:27 +02:00
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
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 and GitHub
58559e56b3
Use _typeshed.Self where __enter__ returns self ( #5698 )
2021-06-27 22:58:58 +03:00
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 and GitHub
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
c522e8e53c
contextlib.nullcontext is a class ( #5695 )
...
Co-authored-by: Akuli <akuviljanen17@gmail.com >
2021-06-26 08:19:03 -07:00
JHeilCoveo and GitHub
64c85cdd44
Fix cachetools decorators ( #5690 )
2021-06-25 08:45:42 -07:00
Jelle Zijlstra and GitHub
5fe2459779
Make SigParameter.replace and Signature.replace return Self ( #5689 )
2021-06-24 18:01:58 +02:00
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 and GitHub
f58c9c7e7d
Extend pyOpenSSL stubs ( #5687 )
2021-06-24 12:21:05 +02:00
Sebastian Rittau and GitHub
bda76bb7d8
Re-add python2 keys to METADATA temporarily ( #5686 )
2021-06-24 00:48:05 +02:00