Commit Graph

6597 Commits

Author SHA1 Message Date
Akuli
3c90c97b9a List[Foo] + List[Bar] now returns List[Foo | Bar] (#8293)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2022-07-15 20:20:50 +03:00
Alex Waygood
0764f9f31f tqdm: Add __all__ to __init__.pyi and submodules (#8308)
Fixes #8307
2022-07-15 17:39:45 +01:00
Alex Waygood
ed0b3a4412 tqdm: Improve a few __init__ methods (#8246) 2022-07-15 10:30:24 +01:00
Shantanu
e90ee8e0d9 [stubsabot] Bump jsonschema to 4.7.* (#8299) 2022-07-15 08:40:05 +02:00
Shantanu
8fb85533cd [stubsabot] Bump setuptools to 63.2.* (#8301)
Co-authored-by: hauntsaninja <>
2022-07-14 20:48:09 -07:00
Shantanu
865eb9bd0c [stubsabot] Bump regex to 2022.7.9 (#8300)
Co-authored-by: hauntsaninja <>
2022-07-14 20:32:48 -07:00
Jelle Zijlstra
55562b83a1 threading: __exit__ only returns None (#8298)
Fixes #8297 

`threading.Lock.__exit__` is implemented in C and can only return None: 6cbb57f62d/Modules/_threadmodule.c (L200)
`threading.Condition.__exit__` returns whatever its lock's `__exit__` returns, but our type annotations indicate that the lock is always a `Lock` or an `_RLock`, and neither returns anything other than None.
2022-07-14 20:00:08 -07:00
hasier
fe44de2741 python-jose: improvements to jose.backends (#8294) 2022-07-14 19:27:27 -07:00
Alex Waygood
10f3238998 Add typing_extensions.NamedTuple (#8295)
Fixes https://github.com/python/typing_extensions/issues/56
2022-07-14 15:02:51 +01:00
Alex Waygood
9645dae925 int.denominator, int.imag: More precise return types (#8266) 2022-07-14 11:25:05 +01:00
hasier
82745be9fc Complete python-jose typing (#8258) 2022-07-13 18:01:08 +01:00
Alex Waygood
6bc6289aaf Use stricter pyright settings for some tkinter stubs (#8291) 2022-07-13 17:16:16 +02:00
Sebastian Rittau
91fd79c158 Updates for Python 3.11.0b4 (#8288) 2022-07-13 13:10:20 +02:00
kasium
b92286982d Add types to invoke.Runner.run (#8279)
Co-authored-by: AlexWaygood <alex.waygood@gmail.com>
2022-07-13 09:29:45 +01:00
Alex Waygood
a1af16bda5 fractions.pyi: Correct dunder parameter names (#8285)
This wasn't possible prior to #8280, which disabled pyright's reportSelfClsParameterName check
2022-07-12 22:40:48 +01:00
Jelle Zijlstra
0306754f5f os: pos-only params for various functions (#8284) 2022-07-12 12:30:19 -07:00
Jelle Zijlstra
2a7439e106 Revert "add overload to tuple.__new__ to better express an empty tuple" (#8278)
This reverts commit 64554bdd5d.

Also add a test case.
2022-07-12 12:29:37 -07:00
Jelle Zijlstra
2a1b33df9f os: Params for posix_fallocate and posix_fadvise are pos-only (#8283)
90a6e56e56/Modules/posixmodule.c (L10845)
2022-07-12 12:19:41 -07:00
Sebastian Rittau
a0f6fb5669 Turn requests.requests.packages into a module (#8281)
Remove obsolete class VendorAlias
2022-07-12 20:30:28 +02:00
Sebastian Rittau
faae950ade Use error codes for type ignores (#8280)
Disable reportSelfClsParameterName for pytype as this is out of typeshed's
control

Closes: #7497
2022-07-12 20:15:49 +02:00
Alex Waygood
6348a58b8b Import Match and Pattern from re, not typing (#8277) 2022-07-12 15:32:48 +02:00
Alex Waygood
27db37240a Remove files that only exist on <=3.6, update a few comments (#8273) 2022-07-12 09:12:32 +02:00
Alex Waygood
78d96cd17e Drop support for Python 2 (#8272) 2022-07-12 09:08:56 +02:00
Sarah Hoffmann
4e0aaccdab Extend annotations for psycopg2.sql (#8263) 2022-07-11 16:31:39 +02:00
Alex Waygood
edc0ecd857 Remove Python 3.6 branches from typeshed (#8269) 2022-07-11 10:55:17 +02:00
Spencer Brown
29c17ffb47 Improve tkinter.simpledialog (#8243) 2022-07-10 19:52:16 +03:00
q0w
4e4de7f660 sysconfig: Add get_default_scheme and get_preferred_scheme (#8265) 2022-07-10 12:31:40 +01:00
John Villalovos
38015e1935 imaplib: annotate imaplib.Commands (#8262)
Add type hints for `imaplib.Commands` which is defined here in
imaplib.py:
6442a9dd21/Lib/imaplib.py (L58-L102)

Closes #8261
2022-07-09 14:27:29 +05:30
Shantanu
ee09a67c5c [stubsabot] Bump docutils to 0.19.* (#8260) 2022-07-08 20:55:22 +01:00
Shantanu
631a948de9 [stubsabot] Bump ujson to 5.4.* (#8259)
Co-authored-by: hauntsaninja <>
2022-07-08 20:42:42 +01:00
Shantanu
72c7eb6f80 [stubsabot] Bump setuptools to 62.6.* (#8224)
Most of setuptools.config is not included as the module is deprecated.
2022-07-08 21:23:18 +02:00
Andrey
b145b32aa9 Add Session annotation for sessionmaker call (#8257) 2022-07-08 10:31:36 +01:00
Alex Waygood
fbddd2c4e2 stdlib: enforce CamelCase for type alias names (#8255) 2022-07-07 17:45:23 +02:00
Alex Waygood
abea36c069 Improve configparser alias names (#8254) 2022-07-07 16:17:09 +01:00
Álvaro Mondéjar
96bc17a40f Annotate jmespath public API (#8253) 2022-07-07 16:42:14 +02:00
Sebastian Rittau
9a5c865034 Drop support for Python 3.6, part 1 (#8250)
* Document that typeshed support 3.7+.
* Don't run tests on Python 3.6.
* Remove Python 3.6 allow lists.
* Merge common allowlist items.

Part of #6189
2022-07-07 14:42:02 +02:00
Alex Waygood
9ccf4589a0 Fix various TypeAlias issues (#8248) 2022-07-07 17:48:44 +05:30
Alex Waygood
850bc78a45 Improve SQLAlchemy type aliases (#8252)
* Remove `sqlalchemy.dbapi` (in favor of `_typeshed.dbapi`).
* Don't re-export mypy imports from `sqlalchemy.ext.mypy.*`.
2022-07-07 14:11:08 +02:00
Alex Waygood
42c5633bf6 Improve tqdm.contrib.logging context managers (#8251) 2022-07-07 10:28:28 +01:00
Kevin Kirsche
ccdb558af9 fix: Return Never rather than None from signal.default_int_handler (#8249) 2022-07-06 11:05:38 -07:00
Shantanu
b941cfffde create_baseline_stubs: check all defs by default (#8227)
Since stubgen will usually create definition complete stubs, we should have
stubtest check missing definitions so we can know to reflect any future
additions.

Co-authored-by: hauntsaninja <>
2022-07-06 22:55:29 +05:30
Alex Waygood
fffb25201a Delete some works of fiction (#8247) 2022-07-06 22:49:18 +05:30
hasier
c39b9e5bd5 Improve python-jose jws and jwt modules (#8238)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2022-07-06 18:06:08 +01:00
Kevin Kirsche
be2921648c Annotate urllib3.disable_warnings (#8245) 2022-07-06 15:35:05 +01:00
Florimond Manca
2792910ace Tweak pre-3.8 iscoroutine stub (#8104) 2022-07-06 13:28:43 +01:00
Sebastián Ramírez
55a52a8b28 Fix type annotation for traceback.StackSummary.from_list() to include FrameSummary items (#8244) 2022-07-06 11:00:35 +01:00
Shantanu
e6482354dd Suggest updating mypy on stub removals (#8049)
Co-authored-by: hauntsaninja <>
2022-07-06 08:11:05 +01:00
David Brownman
64554bdd5d add overload to tuple.__new__ to better express an empty tuple (#7454)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2022-07-05 17:28:08 -07:00
Andrej Shadura
043d9dac61 Add missing aiofiles.tempfile classes (#7523)
Fixes: #6524

Co-authored-by: Andrej Shadura <andrew.shadura@collabora.co.uk>
Co-authored-by: AlexWaygood <alex.waygood@gmail.com>
2022-07-05 23:50:19 +02:00
Anders Kaseorg
db8f3c8f50 Pygments: add pygments.__version__ (#8241)
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2022-07-05 20:26:08 +01:00