Open evan0greenup opened 4 months ago
Describe the bug
When add from __future__ import annotation in the beginning of the source file, it will raise error.
from __future__ import annotation
To Reproduce
Just add from __future__ import annotation in any of example source files, the error will be thrown.
Log/Screenshots
(Skip)
$ python my_sample_code.py [Taichi] mode=release [Taichi] version 0.6.29, llvm 10.0.0, commit b63f6663, linux, python 3.8.3 ...
Additional comments
In the future of Python release, from __future__ import annotations would be defaulted enabled. To get inspiration on how to support this, pydantic https://docs.pydantic.dev/latest/ would be a great resource to learn and research.
from __future__ import annotations
pydantic
Describe the bug
When add
from __future__ import annotation
in the beginning of the source file, it will raise error.To Reproduce
Just add
from __future__ import annotation
in any of example source files, the error will be thrown.Log/Screenshots
(Skip)
Additional comments
In the future of Python release,
from __future__ import annotations
would be defaulted enabled. To get inspiration on how to support this,pydantic
https://docs.pydantic.dev/latest/ would be a great resource to learn and research.