Commit Graph

32 Commits

Author SHA1 Message Date
Alex Waygood
ac30b96d14 Use str instead of Text (#7812) 2022-05-09 20:47:11 +01:00
Jelle Zijlstra
c8a978f756 typing: Add dataclass_transform (#7690)
python/cpython#91861
2022-04-25 22:06:32 -06:00
Jelle Zijlstra
bedf520d76 typing(_extensions) updates for 3.11 (#7643) 2022-04-16 21:42:12 +02:00
Jelle Zijlstra
d09689f811 Add typing_extensions.assert_type (#7627)
Hasn't been released yet but I'd like it to be in the next mypy release.
2022-04-15 15:17:37 -07:00
Alex Waygood
40985b4f02 Fix various __all__ bugs and omissions (#7618) 2022-04-14 08:03:19 -07:00
Alex Waygood
a3245db63c Remove unneeded # noqa comments, fix broken # noqa comments (#7561) 2022-03-28 23:17:44 +02:00
Alex Waygood
f4ae363b56 stdlib: correct many pos-or-kw arg names in dunder methods (#7451) 2022-03-07 16:40:03 +01:00
Shantanu
a6d9b83263 Add @final to several more stdlib classes (#7215)
Co-authored-by: hauntsaninja <>
2022-02-14 15:12:40 -08:00
Jelle Zijlstra
319d23a16e Add PEP 646 and 675 to typing-extensions (#7198) 2022-02-14 08:59:11 +01:00
Jelle Zijlstra
7dd2485269 New additions to typing, typing_extensions (#7169) 2022-02-08 22:40:09 -08:00
Eric Traut
7dc5bed72c Changed typing_extensions.pyi to declare its own private version of Protocol (#7133)
Changed typing_extensions.pyi to declare its own private version of `Protocol` and `runtime_checkable` rather than re-exporting the symbols imported from `typing`. This allows pyright to warn users about runtime exceptions when they attempt to use typing.Protocol on versions of Python prior to 3.7.
2022-02-04 21:02:58 -08:00
Shantanu
b88a6f19cd Upgrade black version (#7089) 2022-01-30 16:27:06 -08:00
Alex Waygood
99cec2d16b Reduce duplication of code between typing and typing_extensions (#7075) 2022-01-29 07:44:42 -08:00
Alex Waygood
7e79706ddd Clarify why some module-level objects in typing have default values (#7037) 2022-01-28 17:38:25 -08:00
Alex Waygood
5d07ebc864 Use PEP 585 syntax in typing and typing_extensions, and remove module-level defaults where possible (#7036) 2022-01-25 16:13:36 +01:00
Alex Waygood
8af5e0d340 Use PEP 585 syntax in Python 2, protobuf & _ast stubs, where possible (#6949) 2022-01-18 07:14:03 -08:00
Alex Waygood
6a88d5e7ae Use _typeshed.Self in Python 2, too (#6932) 2022-01-16 14:44:51 -08:00
Jelle Zijlstra
e53aa04eb2 Add typing_extensions.is_typeddict (#6923) 2022-01-15 17:02:23 -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
Shantanu
e734231314 typing: add _ProtocolMeta (#6394)
Co-authored-by: hauntsaninja <>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2021-11-27 16:53:36 +02:00
Jelle Zijlstra
0860a911e9 typing_extensions: add Self, Required, NotRequired (#6296) 2021-11-14 23:45:35 +01:00
Jelle Zijlstra
fecf258b42 typing_extensions.get_type_hints exists only in 3.7+ (#6283) 2021-11-12 17:45:25 +02:00
Áron Ricardo Perez-Lopez
a88ae10186 Add missing magic properties to TypedDict (#6203) 2021-11-07 15:06:14 -08: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
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
James Morris
5f252e54a0 Add OrderedDict to typing_extensions (#5345) 2021-05-06 17:23:35 -07:00
Shantanu
7619a8fb46 typing_extensions: fix positional-only arg (#5359)
Co-authored-by: hauntsaninja <>
2021-05-06 17:07:43 -07:00
Shantanu
59bf496479 typing: ParamSpec uses kw-only args (#5310)
Co-authored-by: hauntsaninja <>
2021-05-02 12:52:13 -07:00
Shantanu
3aa1f2d42f typing: update and fix for py310 (#5287) 2021-05-01 21:09:26 -07:00
Shantanu
fc660d6d41 Move typing_extensions to stdlib (#5233)
I'm not sure what the best way to do this is. This effectively orphans
types-typing-extensions, but maybe that's not really a problem. (We can
yank the package too)

See https://github.com/python/typeshed/pull/5229#issuecomment-822234125
for some details

Co-authored-by: hauntsaninja <>
2021-04-20 21:55:48 -07:00