Commit Graph

33 Commits

Author SHA1 Message Date
Sebastian Rittau
53a8193d64 Update typing_extensions imports in stdlib (#11244)
Co-authored-by: AlexWaygood <alex.waygood@gmail.com>
2024-01-05 08:15:19 -08:00
Alex Waygood
a570fb6ced Fix various stubtest complaints on Python 3.12 (#10691) 2023-09-10 14:54:43 -07:00
Jelle Zijlstra
c0a0c34020 Use PEP 688 (#10225)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-05-27 19:55:30 -07:00
Alex Waygood
9ed39d8796 Use typing_extensions.Self in the stdlib (#9694) 2023-02-09 09:12:13 +00:00
Alex Waygood
33a62ae42d Add more defaults to the stdlib (#9606)
Continuing work towards #8988.

The first five commits were created using stubdefaulter on various Python versions; the following commits were all created manually by me to fix various problems. The main things this adds that weren't present in #9501 are:

- Defaults in Windows-only modules and Windows-only branches (because I'm running a Windows machine)
- Defaults in non-py311 branches
- Defaults for float parameters
- Defaults for overloads
2023-01-29 01:51:23 +00:00
Jelle Zijlstra
ddfaca3200 stdlib: add argument default values (#9501) 2023-01-18 09:37:34 +01:00
Jelle Zijlstra
460158fc40 imaplib: _Authenticator also works with bytearray (#9056) 2022-11-02 20:55:41 -07:00
Nikita Sobolev
49d3393732 imaplib: fix bytes usage (#9021) 2022-10-28 14:06:55 -07:00
Jason Heiss
d1d9b98aff imaplib.Time2Internaldate also takes datetimes and 9-element tuples (#8630)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2022-08-27 16:11:26 +01:00
Nikita Sobolev
0259068ad6 Remove duplicate definitions in sub-classes (#8594) 2022-08-26 17:10:55 +02:00
Alex Waygood
6348a58b8b Import Match and Pattern from re, not typing (#8277) 2022-07-12 15:32:48 +02: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
Theo Belaire
73ec67587c Replace str with bytes for imaplib append and ParseFlags (#8130)
Last Argument of APPEND
https://github.com/python/cpython/blob/main/Lib/imaplib.py#L1497
https://github.com/python/cpython/blob/main/Lib/imaplib.py#L413
You can see it's parsed with the bytes regex MapCLRF re.compile(br'\r\n|\r|\n')

https://github.com/python/cpython/blob/main/Lib/imaplib.py#L1497
You can see it's parsed with the bytes regex Flags
re.compile(br'.*FLAGS \((?P<flags>[^\)]*)\)')
2022-06-21 12:16:36 -07:00
John Villalovos
fc69e0053a imaplib: fix exception types (#8095)
Closes #8094
2022-06-17 23:45:10 -07:00
Jaakko Lappalainen
611fa18b5c Use bytes for resp param of imaplib.Internaldate2tuple (#7892) 2022-05-20 12:45:20 +02:00
Alex Waygood
97a74bc1aa Import from collections.abc wherever possible (#7635) 2022-04-18 12:50:37 +02:00
Alex Waygood
66bea8ca48 Use imports instead of TypeAliases in a couple places (#7634)
Fixes #7632
2022-04-16 01:38:59 -07:00
Alex Waygood
740193a8fc Use TypeAlias where possible for type aliases (#7630) 2022-04-15 18:01:00 -07:00
Alex Waygood
1acc8f3bd6 Use PEP 604 syntax wherever possible, part II (#7514)
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2022-03-19 14:27:35 +00:00
Alex Waygood
8f2f857ffc Add __all__ for modules beginning with 'h' and 'i' (#7327) 2022-02-20 14:01:45 -08:00
Shantanu
b88a6f19cd Upgrade black version (#7089) 2022-01-30 16:27:06 -08:00
Jelle Zijlstra
de5ec6a0d1 fix incorrect tuple[T] (#6996)
Found from PyCQA/flake8-pyi#135.
2022-01-22 09:37:14 -08:00
Alex Waygood
a40d79a4e6 Use lowercase type everywhere (#6853) 2022-01-08 16:09:29 +01:00
Alex Waygood
8d5d2520ac Use PEP 585 syntax wherever possible (#6717) 2021-12-28 11:31:43 +01:00
Akuli
994b69ef8f Use lowercase tuple where possible (#6170) 2021-10-14 17:18:19 -07:00
Akuli
75ca712f3c check_new_syntax.py: check nested annotations (#6167) 2021-10-14 00:28:38 +03:00
Oleg Höfling
64f481189f drop ellipsis assignments from module vars, classvars and instance attrs (#5914)
Signed-off-by: oleg.hoefling <oleg.hoefling@gmail.com>
2021-08-11 19:26:58 +02:00
Akuli
24780a3e03 imaplib, nntplib, plistlib, poplib: use lower-case list and dict (#5890) 2021-08-08 18:46:23 +02:00
Akuli
ee487304d7 Big diff: Use new "|" union syntax (#5872) 2021-08-08 11:05:21 +02:00
Dominic Davis-Foster
58559e56b3 Use _typeshed.Self where __enter__ returns self (#5698) 2021-06-27 22:58:58 +03:00
Sebastian Rittau
6a9c89e928 Replace 'Text' with 'str' in py3 stdlib (#5466) 2021-05-16 07:10:48 -07:00
Akuli
17dcea4a68 Akuli and srittau: Remove Python 2 branches from Python 3 stubs (#5461)
* run script and do some manual changes (Akuli)

* do the whole thing manually (srittau)

* merge changes (Akuli)

Co-authored-by: Sebastian Rittau <srittau@rittau.biz>
2021-05-15 15:33:39 +03:00
Ivan Levkivskyi
16ae4c6120 Re-organize directory structure (#4971)
See discussion in #2491

Co-authored-by: Ivan Levkivskyi <ilevkivskyi@dropbox.com>
2021-01-27 12:00:39 +00:00