Commit Graph

28 Commits

Author SHA1 Message Date
Konstantin Baikov
02533d13ea Remove obsolete OptExcInfo from sys (#13117) 2024-11-26 09:10:56 +01:00
Shantanu
abfb72e106 wsgiref: update __all__ for py313 (#11940)
GH-111770
2024-05-18 05:53:26 -04:00
Shantanu
470a13ab09 Use PEP 570 syntax in stdlib (#11250) 2024-03-09 14:50:16 -08: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
Nikita Sobolev
0259068ad6 Remove duplicate definitions in sub-classes (#8594) 2022-08-26 17:10:55 +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
Alex Waygood
e2ce7c6344 stdlib: audit more callback annotations (#8209) 2022-07-19 07:07:25 -07:00
Alex Waygood
6348a58b8b Import Match and Pattern from re, not typing (#8277) 2022-07-12 15:32:48 +02:00
Alex Waygood
97a74bc1aa Import from collections.abc wherever possible (#7635) 2022-04-18 12:50:37 +02:00
Sebastian Rittau
321359ca31 Add _typeshed.(Opt)ExcInfo (#7645) 2022-04-18 00:28:43 +01:00
Sebastian Rittau
499e74cf2a Add wsgiref.types (Python 3.11+) (#7644)
_typeshed.wsgi: Import from wsgiref.types in Python 3.11+

Make types match wsgiref.types
2022-04-16 21:36:31 +02:00
Alex Waygood
740193a8fc Use TypeAlias where possible for type aliases (#7630) 2022-04-15 18:01:00 -07:00
Jelle Zijlstra
b7d129f727 PEP 604: Remove some more uses of Union/Optional (#7515)
The following patterns still break mypy:

1. `type[]` at top level fails
2. `tuple[T1, T2]` at top level fails (but `tuple[T1, ...]` is fine)
3. `T1 | Callable[..., T2 | T3]` fails, but only <=3.9

This PR cleans up usage of `Union` and `Optional` outside these patterns.
2022-03-19 08:23:00 -07:00
Alex Waygood
58e505eeb2 Add __all__ for modules beginning with 'u', 'x', 'w' and 'z' (#7374) 2022-02-23 23:04:21 +01:00
Shantanu
b88a6f19cd Upgrade black version (#7089) 2022-01-30 16:27:06 -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
Alex Waygood
9707cb00f6 Python 3.11 removals in stdlib (#6374)
Co-authored-by: Akuli <akuviljanen17@gmail.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2021-11-25 19:34:12 +02:00
Akuli
994b69ef8f Use lowercase tuple where possible (#6170) 2021-10-14 17:18:19 -07:00
Akuli
ce11072dbe Big diff: use lower-case list and dict (#5888) 2021-08-08 09:26:35 -07:00
Akuli
ee487304d7 Big diff: Use new "|" union syntax (#5872) 2021-08-08 11:05:21 +02: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
Sebastian Rittau
45916045c8 Upgrade black to 21.4b0 and reformat (#5250)
This introduces newlines before decorators.
2021-04-26 13:58:27 +02:00
Shantanu
fa9d5a5e9f future first: switch the order of some if statements (#5206)
Since we're adding this to our contribution guidelines in
https://github.com/python/typeshed/pull/5205
2021-04-11 06:44:18 -07: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