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
Alex Waygood
0cff7fea71
http.cookiejar.MozillaCookieJar.header does not exist in 3.10+ (#8228 )
2022-07-03 09:42:14 -07:00
KotlinIsland
60a3cee609
__future__._Feature.getMandatoryRelease() can return None (#8232 )
...
Co-authored-by: KotlinIsland <kotlinisland@users.noreply.github.com >
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com >
2022-07-03 13:27:52 +01:00
Alex Waygood
e19073e871
Add a tiny bit more special-casing for sum ( #8231 )
2022-07-02 20:05:56 +01:00
Alex Waygood
a2e8346d9a
Improve multiprocessing stubs ( #8202 )
...
Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com >
2022-07-01 23:50:39 +05:30
Alex Waygood
f69f711d5a
subprocess.Popen: __new__ -> __init__ (#8203 )
2022-06-28 20:11:03 +02:00
Alex Waygood
802f606a3b
Improve turtle callbacks ( #8200 )
2022-06-28 14:30:50 +02:00
David Askari
2ffa756bb5
Improve None as predicate for Python 2 ifilter ( #8191 )
2022-06-28 14:29:42 +02:00
crusaderky
544c7c9633
shelve.open should return Any ( #8190 )
2022-06-27 10:15:09 -07:00
Alex Waygood
5b44454cf8
Improve inspect callbacks ( #8189 )
2022-06-27 07:07:09 -07:00
Alex Waygood
3e27458323
Improve xmlrpc.client callbacks ( #8188 )
2022-06-27 13:22:33 +01:00
Alex Waygood
208d8e1ec2
Fix assertAlmostEqual regression on mixed numeric types ( #8137 )
2022-06-27 08:57:36 +02:00
Alex Waygood
7c3b13ba4f
asyncio.sslproto: _SSLPipe and several SSLProtocol attributes no longer exist on py311 (#8186 )
2022-06-27 08:12:01 +02:00
Alex Waygood
8b3b6bf7cd
stdlib: Audit Callable[<parameters>, None] annotations ( #8187 )
2022-06-27 08:08:28 +02:00
Alex Waygood
ca44b893e3
multiprocessing: audit callback annotations (#8178 )
2022-06-26 13:15:26 +01:00
Alex Waygood
f812d71ffa
Improve errno stubs on Windows and MacOS ( #8142 )
2022-06-26 08:29:02 +05:30
Alex Waygood
ca2f83a4cf
typing_extensions: harmonise __all__ with __all__ at runtime (#8165 )
2022-06-25 19:16:23 -07:00
Eric Werner
ec64372348
re-export HTTPError in urllib.request ( #8146 )
...
See cpython/#94204
2022-06-24 16:37:09 +02:00
Rohit Patil
d96581ec0f
stdlib.xml: re-export ContentHandler & ErrorHandler (#8140 )
...
fixes python/typeshed#8107
2022-06-22 21:22:33 +01:00
Alex Waygood
89f4dee452
Improve several __hash__ methods ( #8128 )
2022-06-22 11:58:00 +01:00
Alex Waygood
8826d3a36f
Rename some confusingly named type aliases ( #8129 )
2022-06-21 20:51:05 +01:00