Commit Graph

23 Commits

Author SHA1 Message Date
Alex Waygood
f4ae363b56 stdlib: correct many pos-or-kw arg names in dunder methods (#7451) 2022-03-07 16:40:03 +01:00
Alex Waygood
6a743348ca Add __all__ for most modules beginning with 't' (#7373) 2022-02-23 18:25:28 -08:00
Alex Waygood
7ccbbdb30a stdlib: Improve many __iter__ and constructor methods (#7112) 2022-02-02 19:14:57 +01:00
Shantanu
b88a6f19cd Upgrade black version (#7089) 2022-01-30 16:27:06 -08: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
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
5c8e68f0eb Use lowercase set, frozenset and deque where possible (#6346) 2021-11-19 15:05:45 -08:00
Akuli
9af9cca7f3 lowercase list and dict in the rest of stdlib (#5892) 2021-08-09 00:13:08 +02:00
Akuli
ee487304d7 Big diff: Use new "|" union syntax (#5872) 2021-08-08 11:05:21 +02:00
Jon Dufresne
b2e429cd41 Add typing for TarFile._extract_member method (#5841)
Refs: #2673
2021-08-03 08:53:35 +02:00
Anton Grübel
8a107464a8 Use _typeshed.Self with __enter__ (#5719) 2021-07-01 23:15:13 +02:00
Dominic Davis-Foster
48a346920b Use a TypeVar for the return types of TarFile classmethods. (#5602)
* Use a TypeVar for the return types of TarFile classmethods.

* Add TypeVar annotation to TarFile.__enter__
2021-06-12 10:54:34 +03:00
Sebastian Rittau
f562713939 Use protocols instead of IO for bz2 (#5499) 2021-05-29 09:01:43 -07:00
Sebastian Rittau
1ea3d0f003 tarfile improvements (#5492)
* Remove explicit Iterable super class
* Use Literals for mode parameters
* Import from collections.abc
* Use protocols for TarFile(fileobj=) and Tarfile.gzopen()
* Use object instead of Any as protocol return types
2021-05-19 10:13:35 +02:00
Sebastian Rittau
f0bf6eebbd AnyStr cleanup (#5487)
* Replace all uses of StrPath, BytesPath, and AnyPath in Python 2 stubs.
* Add StrOrBytesPath as preferred alias for AnyPath.
* Replace all remaining AnyPath instances with StrOrBytesPath.
* Mark AnyPath as obsolete.

Part of #5470
2021-05-17 20:45:48 +02: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
Sam Bull
050cfda7d9 Change tarfile.extractall() to Iterable (#5273) 2021-04-30 14:40:01 -07:00
Ashwin Ramaswami
54f85c5b27 Add TarFile.offset (#5210)
Add TarFile.offset, which is an undocumented property. Fixes https://github.com/python/typeshed/issues/5209
2021-04-11 20:21:01 -07:00
Vyom Pathak
3c0f2acdf0 Changed: Name argument type to support None value (#5075)
Closes: #5027
2021-02-27 11:32:31 +01:00
Eric Traut
a1f16da64e Added some missing parameter annotations and type arguments detected by pyright. (#5061)
Co-authored-by: Eric Traut <erictr@microsoft.com>
2021-02-23 19:46:53 +01:00
Ankur Singh
f52b154fe7 Add missing definitions in tarfile (#5020)
Resolves #4885
2021-02-15 14:19:49 -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