Commit Graph

32 Commits

Author SHA1 Message Date
Sebastian Rittau
4664986cea Turn TextIOWrapper(buffer) into a protocol (#11420) 2024-02-14 19:49:28 +01:00
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
Sebastian Rittau
23604858a6 Remove Python 3.7 branches (#11238) 2024-01-05 11:39:39 +01:00
Alex Waygood
9eb099ed6b Stubtest fixes for the latest patch release of py311 (#11107) 2023-12-06 00:55:46 +00:00
Alex Waygood
10febc4fe0 stdlib: remove unused type: ignore comments (#11061) 2023-11-23 14:00:07 +01:00
Alex Waygood
5dbdd59c9b Add io.text_encoding on py310+ (#10929)
See https://discuss.python.org/t/type-checkers-complain-about-io-text-encoding/37187/1 for discussion. The function is documented, even though it's not included in `io.__all__` (which is why stubtest hasn't been complaining about it being missing): https://docs.python.org/3/library/io.html#io.text_encoding
2023-10-26 10:41:31 -07:00
Alex Waygood
21d7f7153b [alt] typing: accept buffers in IO.write (#9861)
Co-authored-by: JelleZijlstra <jelle.zijlstra@gmail.com>
2023-03-15 00:42:10 -07:00
Alex Waygood
9ed39d8796 Use typing_extensions.Self in the stdlib (#9694) 2023-02-09 09:12:13 +00:00
Alex Waygood
1d7dda7fa1 stdlib: Add defaults for positional-only parameters (#9655) 2023-02-01 21:44:08 +00:00
Jelle Zijlstra
ddfaca3200 stdlib: add argument default values (#9501) 2023-01-18 09:37:34 +01:00
Avasam
aad1a14890 Use the FileDescriptorOrPath alias consistently in the stdlib (#9513) 2023-01-12 18:14:48 +00:00
Nikita Sobolev
f972bdfd96 io, codecs: improve bytes handling (#9059) 2022-11-02 09:32:06 -07:00
Shantanu
86ada9e41a io: use ReadableBuffer for BytesIO (#8995) 2022-10-27 11:42:11 +02:00
Nikita Sobolev
0259068ad6 Remove duplicate definitions in sub-classes (#8594) 2022-08-26 17:10:55 +02:00
Alex Waygood
1dc1c91429 io.IOBase: correct metaclass (#8468)
`io.IOBase` has `ABCMeta` as the metaclass at runtime: 75a6441718/Lib/io.py (L71)

But not currently in the stub. This is causing an unexpected stubtest failure for a `urllib3` PR here: https://github.com/python/typeshed/runs/7633083101?check_suite_focus=true
2022-08-02 09:20:07 -07:00
Alex Waygood
edc0ecd857 Remove Python 3.6 branches from typeshed (#8269) 2022-07-11 10:55:17 +02:00
Alex Waygood
e88a182573 Simplify __all__ definitions in modules beginning with 'a' to 'l' (#8026) 2022-06-07 15:40:48 +02:00
Alex Waygood
97a74bc1aa Import from collections.abc wherever possible (#7635) 2022-04-18 12:50:37 +02:00
Alex Waygood
340c6c97ed Add mypy error codes to type: ignores, remove unused ignores (#7504)
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2022-03-19 13:10:00 +00:00
Aaron Kau
a3e62d56fc change Change IO/IOBase.__exit__ return type to None (#7471) 2022-03-10 15:57:05 +01:00
Alex Waygood
8f2f857ffc Add __all__ for modules beginning with 'h' and 'i' (#7327) 2022-02-20 14:01:45 -08:00
Alex Waygood
5e8a2a9364 Fix various pos-only stubtest complaints previously allowlisted (#7228) 2022-02-15 17:51:34 +01:00
Nikita Sobolev
74d043b9bb Use Literal type in io and _compression (#6917) 2022-01-14 11:32:07 -08:00
Alex Waygood
a40d79a4e6 Use lowercase type everywhere (#6853) 2022-01-08 16:09:29 +01:00
Sebastian Rittau
e77a66aced Update pyright (#6840) 2022-01-07 18:58:15 +02:00
Alex Waygood
8d5d2520ac Use PEP 585 syntax wherever possible (#6717) 2021-12-28 11:31:43 +01:00
Akuli
a5bc1e037f Add mypy error codes to '# type: ignore' comments (#6379) 2021-11-26 07:07:56 +01: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
Thomas Grainger
c968614bae fix type of FileIO.__init__ opener kwarg (#5738)
Co-authored-by: Akuli <akuviljanen17@gmail.com>
2021-07-08 13:50:56 -07:00
Anton Grübel
96e0660fba Use _typeshed.Self with __enter__ (#5717)
Co-authored-by: Akuli <akuviljanen17@gmail.com>
2021-07-01 12:32:32 +02: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