Dave Halter
ae9d4f4b21
Make builtins work
...
- Jedi cannot really deal with __new__.
- A typeshed issue: "function" should not be defined in the stubs.
- Jedi cannot deal with the weird __call__: NotImplemented typing,
because it's recursive.
2021-01-01 03:14:46 +01:00
Ivan Levkivskyi
fb753c4226
Loosen some types to avoid pain in real-life situations ( #4870 )
...
In this diff:
* Loosen `set.__[i]sub__()` to allow typical use cases (that work at runtime). Namely, allow removing `unicode` from a set of `str`, and allow removing optional values from non-optional sets.
* Avoid using union return types in `cryptography` deserialization functions.
* Tune `SupportsItems` so that `dict` implements it on Python 2.
Co-authored-by: Ivan Levkivskyi <ilevkivskyi@dropbox.com >
2020-12-29 18:31:14 +00:00
melassa
1ae3158174
Pack ipadx ipady do not accept tuple ( #4869 )
...
Closes #4861
2020-12-29 15:26:08 +01:00
Shantanu
0a8fd098ca
ast: remove docstring attribute ( #4868 )
...
As mentioned in #4760
Co-authored-by: hauntsaninja <>
2020-12-29 08:43:15 +01:00
melassa
350095e960
Add name field to tk widgets ( #4867 )
2020-12-28 21:59:27 +01:00
Nipunn Koorapati
a0cc2f537d
Add __eq__ override to ScalarMap and MessageMap of google/protobuf/containers.pyi ( #4866 )
...
These classes are defined
https://github.com/protocolbuffers/protobuf/blob/master/python/google/protobuf/internal/containers.py
They actually inherit from a copy-pasta of the Mapping superclass which
includes an __eq__ override, but this is close enough. It prevents
strict equality checks between these and Dicts from failing
2020-12-28 13:12:53 +01:00
Shantanu
12f0be025f
mypy_primer: shard across two CI jobs ( #4865 )
...
Co-authored-by: hauntsaninja <>
2020-12-28 11:17:39 +01:00
Tom Most
cf7606a33b
Add sys.getfilesystemencodeerrors from PEP 529 ( #4864 )
2020-12-28 09:07:22 +01:00
Nils K
a3c9392331
Add overload to cast for objects ( #4851 )
...
Fixes #4810
2020-12-27 23:46:26 -08:00
Jon Dufresne
2cb6b14834
Add type for distutils.command.install.SCHEME_KEYS ( #4863 )
2020-12-27 19:54:43 +01:00
melassa
87278af3e5
Changed Dict with Mapping in grid/pack/place_configure #4836.2 ( #4859 )
...
Part of #4836
2020-12-27 12:34:28 +01:00
melassa
be55392a87
Grid padx/pady accept tuple ( #4860 )
...
Closes : #4830
2020-12-27 12:32:59 +01:00
Shantanu
bc3ed283df
ctypes.wintypes can be imported on linux in 3.9.1 ( #4858 )
...
See https://bugs.python.org/issue16396
Co-authored-by: hauntsaninja <>
2020-12-26 16:01:23 +01:00
Akuli
eb7381a3c1
use bool for tkinter.FALSE and its friends ( #4853 )
...
Fixes #4669
2020-12-25 16:07:55 +01:00
Frank Maximilian
6dae28a017
Add missing attribute hints for click.types ( #4813 )
...
Co-authored-by: Maximilian Frank <maximilian.frank@ait.ac.at >
2020-12-23 15:55:43 +01:00
Nipunn Koorapati
4f81ac10ae
Update mypy protobuf pin to include well_known_types ( #4850 )
2020-12-23 09:47:33 +01:00
Adam Kliś
f27d7dea07
Fix typo in camellia algorithm name ( #4847 )
2020-12-22 15:04:44 +01:00
Timur Kushukov
55ebc0b673
make itertools.product with repeat more precise ( #4843 )
2020-12-21 17:47:04 -08:00
Ivan Levkivskyi
472d830876
Fix well known types in protobuf stubs ( #4845 )
...
Co-authored-by: Ivan Levkivskyi <ilevkivskyi@dropbox.com >
2020-12-21 16:20:53 +00:00
Shantanu
32420769cd
Revert "Remove unused stubtest whitelist entries ( #4839 )" ( #4842 )
...
This reverts commit fcc2416d43 .
Co-authored-by: hauntsaninja <>
2020-12-19 23:24:35 -05:00
Jon Dufresne
dc80863254
Update isort URL to new location: https://github.com/PyCQA/isort ( #4841 )
2020-12-19 22:15:09 -05:00
github-actions[bot]
fcc2416d43
Remove unused stubtest whitelist entries ( #4839 )
2020-12-19 14:30:14 +01:00
Jelle Zijlstra
3e9ed39bec
remove "Union[str, str]" ( #4838 )
...
I grepped and didn't find any other instances of redundant unions like this one.
2020-12-18 14:13:41 -06:00
alexander-held
60e6a3560e
fix: support dictionaries as table headers ( #4835 )
...
Fixes #4829
2020-12-18 19:21:22 +01:00
Ivan Levkivskyi
53d7813b3c
Try fixing mypy-protobuf backwards incompatibility ( #4833 )
...
Currently, the only way forward would be to update `mypy` and `mypy-protobuf` at the same time, which causes pain. The imprecise fallback overloads can be removed later, I leave comments about this.
Co-authored-by: Ivan Levkivskyi <ilevkivskyi@dropbox.com >
2020-12-18 13:35:28 +00:00
Julien Danjou
90eb34a8be
Add to_url() return type ( #4831 )
2020-12-18 11:44:38 +01:00
Ash Berlin-Taylor
3e10b44bb4
copy.deepcopy memo type is Any, not input type ( #4828 )
2020-12-16 17:38:11 +01:00
Jon Dufresne
3ae99d153b
Allow Python 2 unicode for some click interfaces ( #4825 )
...
Helps Python 2 code using:
form __future__ import unicode_literals
On Python 2, these interfaces are compatible with both str and unicode.
2020-12-15 20:51:43 +01:00
Jun Jia
35d73ef277
type of argument_default should be Any ( #4811 )
2020-12-14 19:17:19 +01:00
Sebastian Rittau
1c6ac09b82
Add EllipsisType, NoneType, and NotImplementedType (Python 3.10) ( #4822 )
2020-12-14 18:38:35 +01:00
cdce8p
e5d3a47632
Add stubs for AsyncMock ( #4752 )
2020-12-14 18:32:14 +01:00
Shantanu
e035760d62
Return mypy_primer to CI ( #4806 )
...
Much of the comment script is based off of https://github.com/dawidd6/action-download-artifact
Co-authored-by: hauntsaninja <>
2020-12-14 18:31:30 +01:00
Jia Chen
02b3a48313
Annotate load_entry_point() ( #4775 )
2020-12-14 17:20:40 +01:00
Mikhail Sveshnikov
41faab1f51
Overload defaults type when allow_no_value==True ( #4774 )
...
Closes #4773
2020-12-14 17:16:52 +01:00
Sebastian Rittau
c26b804055
Remove a missing import ( #4821 )
...
Works around #4815 , although a proper fix is needed.
2020-12-14 11:49:22 +01:00
Sam Bull
8da53223d7
Fix pkg_resources.require() ( #4818 )
2020-12-14 09:34:18 +01:00
Shantanu
a93fa6120e
mypy_test: fix for stub deletions ( #4816 )
...
I think this should helps prevent issues like #4815
Co-authored-by: hauntsaninja <>
2020-12-13 23:41:20 -08:00
Guido van Rossum
7aa5bd0029
Add PEP 612 support to typing_extensions stub ( #4814 )
2020-12-13 23:40:37 -08:00
Steve Dignam
3d14016085
concurrent.futures: add _work_queue property to ThreadPoolExecutor ( #4808 )
...
`ThreadPoolExecutor` assigns a `queue.SimpleQueue` to `_work_queue` in
its `__init__` method.
7cf0aad96d/Lib/concurrent/futures/thread.py (L144)
2020-12-09 19:23:19 -08:00
Hynek Schlawack
cb43535541
Add importlib.resources.files for Python 3.9 ( #4807 )
...
Co-authored-by: hauntsaninja <>
Co-authored-by: Sebastian Rittau <srittau@rittau.biz >
2020-12-09 13:47:45 +01:00
Rebecca Chen
61c5667b3f
Fix a Python 2 annotation in shlex. ( #4805 )
...
8d21aa21f2/Lib/shlex.py (L24)
suggests instream can be a string as well.
2020-12-07 14:27:56 -08:00
Eric Traut
c4d8507ff7
Removed unused import symbols from stdlib stubs and fixed a few other errors detected by pyright. I did a similar pass several months ago; these were introduced since then. ( #4803 )
...
Co-authored-by: Eric Traut <erictr@microsoft.com >
2020-12-06 18:44:18 +01:00
Phillip Huang
3d8a29705e
DeleteJSONDecodeError from Python2's json module ( #4799 )
...
Co-authored-by: Phillip Huang <phillip@dropbox.com >
2020-12-02 13:24:22 -08:00
Ran Benita
1958f3ec67
threading: properly export excepthook, ExceptHookArgs ( #4797 )
...
An `import X as Y` where X != Y no longer exports, so
27a45df479 caused them to be un-exported.
2020-12-02 14:58:52 +01:00
Pete Scopes
906b4ec5ba
Cryptography 3.x pkcs12 ( #4792 )
2020-12-01 16:16:44 +01:00
Vasily Zakharov
d252e4aae9
Some missing stubs for cryptography.x509 ( #4761 )
2020-11-30 12:43:59 +01:00
Philipp Hahn
2b3aa94fb5
paramiko - A Python implementation of SSHv2 ( #4770 )
...
* paramiko - A Python implementation of SSHv2
Code: <https://github.com/paramiko/paramiko >
Doc: <http://docs.paramiko.org/en/stable/index.html >
2020-11-30 11:15:21 +01:00
Shantanu
74147313cd
Remove mypy_primer ( #4795 )
...
Co-authored-by: hauntsaninja <>
2020-11-29 23:03:42 -08:00
Jonathan Schoonhoven
6d697e7f2c
fix redis str types ( #4783 )
2020-11-28 19:26:05 -08:00
Nipunn Koorapati
9af49c0b69
Protobuf stubs update using mypy-protobuf ( #4785 )
...
* Add script to generate protoc stubs using mypy-protobuf generated stubs
* Use generate_proto_stubs to generate stubs for protobuf 3.14.0
* Skip _pb2.pyi from flake8,black,isort,pytype
2020-11-25 10:48:26 -08:00