Commit Graph

4424 Commits

Author SHA1 Message Date
Sam Bull
be0d159df3 asyncio.AbstractEventLoop: Allow Path for create_unix_server() (#8376) 2022-07-24 15:43:52 +01:00
Shane Harvey
7a73660f3f Fix hints for TestCase.assertRaises (#8373) 2022-07-23 10:43:38 +01:00
Nikita Sobolev
32bac7280e Remove python3.6 stubs from pyclbr (#8364) 2022-07-22 11:36:04 +02:00
Nikita Sobolev
fab1b59715 Always return Iterator, not Iterable for __iter__ (#8361) 2022-07-22 08:10:58 +01:00
Shantanu
1a8a49e671 wsgiref.types: use Iterator, not Iterable (#8358)
https://github.com/python/typeshed/issues/8356
2022-07-21 13:26:44 -07:00
Tetsuo Kiso
9fe771f31d xml.dom.minidom: add more missing type annotations to methods on Element (#8355) 2022-07-21 17:45:52 +02:00
Tetsuo Kiso
10bc4b0584 xml.dom.minidom: add missing type annotation of Element.getAttribute (#8350) 2022-07-21 08:18:58 +02:00
Alex Waygood
5bc9554573 stdlib/VERSIONS: fix crusty comment (#8347)
Resolves #8310
2022-07-20 18:59:01 +02:00
Alex Waygood
d1e80a724a Add some missing Windows constants (#8346) 2022-07-20 17:45:36 +01:00
Alex Waygood
a57e182608 enum: Correct IntFlag mro on 3.11+ (#8334) 2022-07-19 21:47:37 +02:00
Sebastian Rittau
5534007189 Fix return type of email.header.decode_header() (#8337) 2022-07-19 20:43:48 +01:00
Alex Waygood
6903041744 Use CamelCase for type aliases in xml.etree.ElementPath.pyi (#8335) 2022-07-19 12:04:43 -07:00
q0w
6d0e01e62b socketserver: Set StreamRequestHandler.connection to SSLSocket (#8274) 2022-07-19 09:13:43 -07:00
Shantanu
f76c6ed55a multiprocessing: make some overloads more precise (#8330)
See discussion here: https://github.com/python/typeshed/issues/4266#issuecomment-1187867029

Co-authored-by: hauntsaninja <>
2022-07-19 16:55:23 +01:00
Alex Waygood
e2ce7c6344 stdlib: audit more callback annotations (#8209) 2022-07-19 07:07:25 -07:00
Alex Waygood
540a6b25bf Improve urllib.parse.urldefrag (#8204)
Fixes #2477
2022-07-19 07:05:09 -07:00
Shantanu
46937df750 wave: allow passing anonymous tuple (#8328)
Fixes #8322
2022-07-18 19:53:50 -07:00
Shantanu
4b184356f1 string: remove stray comment (#8329) 2022-07-18 19:53:15 -07:00
Alex Waygood
e156c63bdb inspect, asyncio: Use more TypeGuards (#8057) 2022-07-18 19:49:12 -07:00
Alex Waygood
4b504c78e0 Improve asyncio callbacks (#8192) 2022-07-18 19:46:38 -07:00
Graham Bleaney
9519e3652b Add LiteralString support to string module (#8268)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2022-07-18 19:34:27 -07:00
Alex Waygood
35616b439f Run pycln as a pre-commit hook in CI (#8304) 2022-07-18 09:27:28 +02:00
Alex Waygood
1ebe1b463e Fix asyncio.gather regression (#8271)
Adding the empty-tuple overload caused major problems for pyright, and that overload only deals with an unlikely edge case anyway. Get rid of it, and replace the fallback overload with a more general overload.

Fixes #8270.
2022-07-16 18:56:58 +01:00
Shantanu
de1a79bd00 Make VERSIONS more accurate (#8311)
Some of the versions starting at 3.6 looked suspicious, so I
checked those against git history for the CPython repo.
2022-07-15 18:19:42 -07:00
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
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
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
Sebastian Rittau
91fd79c158 Updates for Python 3.11.0b4 (#8288) 2022-07-13 13:10:20 +02: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
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
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
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
Kevin Kirsche
ccdb558af9 fix: Return Never rather than None from signal.default_int_handler (#8249) 2022-07-06 11:05:38 -07:00
Alex Waygood
fffb25201a Delete some works of fiction (#8247) 2022-07-06 22:49:18 +05:30
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
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
Alex Waygood
73974e974d Improve warnings.catch_warnings (#8229) 2022-07-04 17:05:21 +02:00
Chris Cotter
f7ff6239ff asyncio task factory can accept Coroutines too (#8205)
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-03 18:00:29 +01:00