-
Notifications
You must be signed in to change notification settings - Fork 257
Add PEP 613 TypeAlias to typing_extensions #732
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add PEP 613 TypeAlias to typing_extensions #732
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
anyhow as -> 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(again)
|
||
Predicate: TypeAlias = Callable[[...], bool] | ||
|
||
It's invalid when used anyhow but as in the example above. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(ditto)
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! All good.
At the moment this special marker annotation described in PEP 613 exists only in typing_extensions module (see python/typing#732).
No description provided.