Skip to content
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

Open
3 of 5 tasks
srittau opened this issue Jan 6, 2021 · 4 comments
Open
3 of 5 tasks

PEP 613 (Explicit Type Aliases) tracker #4913

srittau opened this issue Jan 6, 2021 · 4 comments

Comments

@srittau
Copy link
Collaborator

@srittau srittau commented Jan 6, 2021

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:

@srittau srittau changed the title PEP 613 Explicit Type Aliases tracker PEP 613 (Explicit Type Aliases) tracker Jan 6, 2021
@srittau
Copy link
Collaborator Author

@srittau srittau commented Jan 6, 2021

@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?

Loading

@sproshev
Copy link
Contributor

@sproshev sproshev commented Jan 6, 2021

Supported since PyCharm 2020.3 https://youtrack.jetbrains.com/issue/PY-42334

Loading

@rchen152
Copy link
Collaborator

@rchen152 rchen152 commented Jan 7, 2021

pytype doesn't support this yet. Opened google/pytype#787.

Loading

@srittau
Copy link
Collaborator Author

@srittau srittau commented Jun 14, 2021

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)

Loading

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants