Commit Graph

13 Commits

Author SHA1 Message Date
Alex Waygood
a08d4c8d2e Remove many redundant inheritances from Generic[] (#10933) 2023-10-26 20:07:20 +02: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
Nikita Sobolev
a03e8b4949 Revert __eq__ removal (#8487)
Refs #8483
2022-08-04 23:51:42 +02:00
Nikita Sobolev
a376da87bd Remove duplicate definitions (#8483) 2022-08-04 18:55:18 +02:00
Jelle Zijlstra
789c12ad90 constructors: Fix defaulted TypeVars (#7965)
From the list in https://github.com/microsoft/pyright/issues/3501
2022-05-27 07:32:56 +01:00
Alex Waygood
97a74bc1aa Import from collections.abc wherever possible (#7635) 2022-04-18 12:50:37 +02:00
Alex Waygood
748e4d3a20 Add _weakrefset.__all__ (#7286) 2022-02-19 12:21:29 -08:00
Alex Waygood
b1b3471c76 Improve in-place BinOp methods for sets (#7161) 2022-02-08 14:57:50 +01:00
Alex Waygood
96c9abb058 Always use _typeshed.Self, where applicable (#6880)
* Always use `_typeshed.Self`, where applicable

* Revert changes to `google-cloud-ndb` (ambiguous)

* Remove empty line added by script

* Revert changes to `stubs/python-dateutil/dateutil/relativedelta.pyi`

* Manually add a few more that the script missed

* Improve `filelock` annotation

Source code here: 79ec7b2826/src/filelock/_api.py (L207)

* Improve `opentracing/scope` annotation

Source code here: 3e1d357a34/opentracing/scope.py (L71)

* Improve `redis/client` stub

Source code here: 15f315a496/redis/client.py (L1217)

* Improve `redis/lock` annotation

Source code here: 15f315a496/redis/lock.py (L155)

* Improve `requests/models` annotation

Source code here: d718e75383/requests/models.py (L653)
2022-01-09 19:16:19 -08:00
Akuli
ee487304d7 Big diff: Use new "|" union syntax (#5872) 2021-08-08 11:05:21 +02:00
Eric Traut
e2967a8bee Eliminated the use of "bare" TypeVars in stdlib stubs (#5041)
Eliminated the use of "bare" TypeVars (i.e. a TypeVar that appears only once) within generic methods. While not considered an error in PEP 484, these are a common source of bugs in code, and some type checkers (including pytype and pyright) flag them as errors.

Co-authored-by: Eric Traut <erictr@microsoft.com>
2021-02-27 19:43:45 -08: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