Commit Graph

31 Commits

Author SHA1 Message Date
Jelle Zijlstra cff08b674a isort: Add more to extra_standard_library (#9098) 2022-11-04 22:56:40 -07:00
Nikita Sobolev f972bdfd96 io, codecs: improve bytes handling (#9059) 2022-11-02 09:32:06 -07:00
Alex Waygood 4414246a15 Clean up a few Python 2 remnants (#8452) 2022-07-31 19:19:18 +01:00
Jelle Zijlstra 9660ee97ee codecs: add missing function, reflect runtime import * (#7918) 2022-05-22 16:06:21 -07:00
Sebastian Rittau e1bd9c73f0 Use I/O protocols in codecs.pyi (#7849) 2022-05-17 15:01:57 +02:00
Alex Waygood 97a74bc1aa Import from collections.abc wherever possible (#7635) 2022-04-18 12:50:37 +02:00
Alex Waygood 740193a8fc Use TypeAlias where possible for type aliases (#7630) 2022-04-15 18:01:00 -07:00
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 6fc4c14181 Add missing objects in codecs, configparser, and multiprocessing.dummy (#7360) 2022-02-22 18:25:27 +01:00
Alex Waygood 199475ef8b Add codecs.__all__ (#7294) 2022-02-19 12:25:25 -08:00
Alex Waygood f3ad0179f8 Fix return types in codecs (#7199) 2022-02-14 14:03:58 +01:00
Shantanu 4d21d5a87d codecs: allow str to bytes decoding for "hex", fix overloads (#7118)
Fixes #7115

Co-authored-by: hauntsaninja <>
2022-02-03 14:20:11 -08:00
PabloLION 0ccbc29919 fix: enable encode/decode from/to hex string (#7115) 2022-02-02 23:05:16 +01:00
Alex Waygood 33ecb68603 Fix return annotations of several methods that return self at runtime (#7070) 2022-01-28 17:37:49 -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: https://github.com/tox-dev/py-filelock/blob/79ec7b2826e33b982fe83b057f359448b9d966ba/src/filelock/_api.py#L207

* Improve `opentracing/scope` annotation

Source code here: https://github.com/opentracing/opentracing-python/blob/3e1d357a348269ef54d67f761302fab93dbfc0f7/opentracing/scope.py#L71

* Improve `redis/client` stub

Source code here: https://github.com/redis/redis-py/blob/15f315a496c3267c8cbcc6d6d9c6005ea4d4a4d5/redis/client.py#L1217

* Improve `redis/lock` annotation

Source code here: https://github.com/redis/redis-py/blob/15f315a496c3267c8cbcc6d6d9c6005ea4d4a4d5/redis/lock.py#L155

* Improve `requests/models` annotation

Source code here: https://github.com/psf/requests/blob/d718e753834b84018014a23d663369ac27d1ab9c/requests/models.py#L653
2022-01-09 19:16:19 -08:00
Nikita Sobolev da3292d271 Use Literal type for BOM_* constants in codecs.pyi (#6873) 2022-01-09 18:31:15 +01:00
Alex Waygood a40d79a4e6 Use lowercase type everywhere (#6853) 2022-01-08 16:09:29 +01:00
Nikita Sobolev c4a68faf6c Use Literal type in codecs (#6857) 2022-01-08 12:57:57 +01:00
Alex Waygood 8d5d2520ac Use PEP 585 syntax wherever possible (#6717) 2021-12-28 11:31:43 +01:00
Akuli 08649177f1 Add codecs.BOM* constants (#6515) 2021-12-06 17:36:09 +02:00
Akuli a5bc1e037f Add mypy error codes to '# type: ignore' comments (#6379) 2021-11-26 07:07:56 +01: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
Anton Grübel c38171a0b3 Use _typeshed.Self with __enter__ (#5712) 2021-06-29 15:19:25 -07:00
Pavel Karateev 038556cb7e Add codecs.unregister() for Python 3.10 (#5539) 2021-05-27 12:33:02 +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
hatal175 ef9b37ecab codecs stubtest exceptions (#5179) 2021-04-03 22:44:16 -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