-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
PEP 613 (Explicit Type Aliases) tracker #4913
Comments
@rchen152 I am sorry for the mention spam, but does pytype support PEP 613? If not, would you mind me creating a ticket that we can reference from here? |
Supported since PyCharm 2020.3 https://youtrack.jetbrains.com/issue/PY-42334 |
pytype doesn't support this yet. Opened google/pytype#787. |
I used this simple script to test this feature. from typing_extensions import TypeAlias
Alias1 = str
Alias2: TypeAlias = str
def foo() -> Alias1: pass
def bar() -> Alias2: pass
reveal_type(foo)
reveal_type(bar) |
mypy 0.930 now supports this. |
pytype-2022.03.21 supports explicit type aliases. |
Seems like there's nothing left to do here :) |
Reopening as mypy still seems to have problems. #7534 |
Whoops, that's embarrassing XD |
mypy and pytype are now fixed. 🎉 |
Does the closing of this issue mean that TypeAlias can now be used in TypeShed? if yes, this should probably be edited: Lines 241 to 242 in be64b01
|
It does — and yes, PR welcome, if you'd like to help out! |
#8397 created to address this |
This issue is supposed to track when we can start to use explicit type aliases (PEP 613) in typeshed. Support is needed in released versions of:
The text was updated successfully, but these errors were encountered: