from __future__ import annotations breaks typer in lower python version #977
Unanswered
Asthestarsfalll
asked this question in
Questions
Replies: 1 comment
-
I also ran into the same issue on python 3.9, when trying to use a custom class with a parser:
results in
This was for a helper python script where I was using python 3.9 simply because the library that the helper script is "helping" has to support lower versions. I can easily switch to a recent version in this case, but it took me a while to figure out that the issue was a bug and not my misuse of typer. @tiangolo I'd be happy to make a PR with a disclaimer in the documentation if you could point me the right place to do this. If you think the fix is easy, I could also take a jab at it as well. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
First Check
Commit to Help
Example Code
Description
In python 3.8 and 3.9, run
It will raise error:
Python 3.10 works well.
Operating System
Linux
Operating System Details
No response
Typer Version
0.12.5
Python Version
3.8/3.9
Additional Context
No response
Beta Was this translation helpful? Give feedback.
All reactions