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

Cannot resolve ForwardRef if from __future__ import annotation is used. #361

Closed
hanjinliu opened this issue Jan 29, 2022 · 0 comments · Fixed by #362
Closed

Cannot resolve ForwardRef if from __future__ import annotation is used. #361

hanjinliu opened this issue Jan 29, 2022 · 0 comments · Fixed by #362

Comments

@hanjinliu
Copy link
Contributor

In a .py file, the type matcher fails to convert simple types (int, str, ...) into widgets if the file starts with from __future__ import annotation.

from __future__ import annotation
from magicgui import magicgui

@magicgui
def f(i: int):
    pass

Looks like it is because int is converted into "int". Additional matching system is needed.

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

Successfully merging a pull request may close this issue.

1 participant