Add PEP 613 TypeAlias to typing_extensions#732
Conversation
gvanrossum
left a comment
There was a problem hiding this comment.
Thanks for doing this!
I'd like some positive tests (in the py2 and py3 versions) and I have some textual nits, then it's good to go.
|
|
||
| Predicate = Callable[[...], bool] # type: TypeAlias | ||
|
|
||
| It's invalid when used anyhow but as in the example above. |
There was a problem hiding this comment.
anyhow but -> anywhere except
|
|
||
| Predicate: TypeAlias = Callable[[...], bool] | ||
|
|
||
| It's invalid when used anyhow but as in the example above. |
There was a problem hiding this comment.
anyhow as -> anywhere except
|
|
||
| Predicate: TypeAlias = Callable[[...], bool] | ||
|
|
||
| It's invalid when used anyhow but as in the example above. |
|
|
||
| Predicate: TypeAlias = Callable[[...], bool] | ||
|
|
||
| It's invalid when used anyhow but as in the example above. |
|
Oh, sorry, I missed the notifications. I've added positive tests and fixed docstrings as suggested. Also, there happened to be a mistake in I pushed everything as individual commits to make the changes more evident as e.g. typeshed contributing guidelines require, let me know if I need to squash them manually. |
|
@east825 Please don't squash, we do that when we merge. I am behind on code reviews, ping me later this week. |
At the moment this special marker annotation described in PEP 613 exists only in typing_extensions module (see python/typing#732).
No description provided.