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

Handling type aliases #60

Open
adsharma opened this issue Aug 13, 2021 · 0 comments
Open

Handling type aliases #60

adsharma opened this issue Aug 13, 2021 · 0 comments

Comments

@adsharma
Copy link

from typing import Union, Dict, List

JsonData = Union[Dict[str, 'JsonData'], List['JsonData'], int, float, bool, None]
a: JsonData = {"foo" : 10}

Fails with

NameError: Name Union is not defined.
x = int
a: x = 10

also fails, but with a different error message.

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

No branches or pull requests

1 participant