Commit Graph

4509 Commits

Author SHA1 Message Date
Akuli
c45a879b1f add types to winfo methods that return coordinates or sizes (#4894) 2021-01-03 16:47:31 +01:00
melassa
7eed4a9edb Type Menu.tk_popup() (#4893) 2021-01-03 12:53:03 +01:00
melassa
2ab1b03a5b Removed bbox comment in Misc (#4892) 2021-01-02 19:57:16 +01:00
melassa
3c26c7221c _PlaceInfo and place_configure fix #4872 (#4873)
Co-authored-by: Akuli <akuviljanen17@gmail.com>
2021-01-02 19:56:41 +01:00
melassa
1cc3282d65 Added **kw to place/pack/grid_configure #4836 (#4874) 2021-01-02 15:03:00 +01:00
github-actions[bot]
074de8a24e Remove unused stubtest whitelist entries (#4887)
Co-authored-by: hauntsaninja <hauntsaninja@users.noreply.github.com>
2021-01-01 20:41:40 -08:00
Shantanu
781430fdf1 multiprocessing: improve Server (#4886)
Co-authored-by: hauntsaninja <>
2021-01-02 00:54:28 +01:00
Sebastian Rittau
5961fe4aa8 Allow arguments to (memoryview,bytearray).hex (#4883)
Closes #4798
2021-01-01 15:00:03 -08:00
Mahmoud Abduljawad
2c314617f9 Added missing path atribute to TarInfo class (#4884) 2021-01-01 19:47:54 +01:00
Sam Bull
d482fa00cb Remove Any from asyncio.create_task() (#4840) 2021-01-01 15:03:05 +01:00
Eric Traut
0cf9a38eb8 Addressed minor errors caught by pyright in stdlib stubs (#4880)
* 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.

* Added a few missing types and type arguments. Removed unused import statement. Removed default values that caused overloads to have overlapping signatures.

Co-authored-by: Eric Traut <erictr@microsoft.com>
2021-01-01 15:00:09 +01:00
Hong Xu
6458a41568 Use generic self for socketserver.BaseServer.__enter__ (#4882)
This is to guarantee the classes that inherit `BaseServer` (e.g.,
`HTTPServer`) to have a proper return type of `__enter__`. For example,

    with HTTPServer() as httpd:
        pass

`httpd` should be of type `HTTPServer`, not `BaseServer`.
2020-12-31 23:20:20 -08:00
Guido van Rossum
dcaea8bf06 Add TypeGuard (PEP 647 draft) (#4879) 2020-12-30 14:31:40 -08:00
Sebastian Rittau
91582e6921 Drop old branches in stdlib/3/os/path.pyi (#4878)
* Drop support for Python 3.5 in stdlib/3/os/path.pyi

* Remove more obsolete branches
2020-12-30 12:41:09 -08:00
Ivan Levkivskyi
4141dd1176 Few more fixes for issues found by testing on internal codebases (#4876)
Few unrelated (but quite obvious) fixes here.

Co-authored-by: Ivan Levkivskyi <ilevkivskyi@dropbox.com>
2020-12-30 17:32:14 +00:00
melassa
85d6df4742 Added children field to Misc #4834 (#4871)
Co-authored-by: you <you@example.com>
2020-12-30 02:09:18 +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