Currently we seem to include from __future__ import annotations in all cases. But it should only be needed if (1) there are type declarations; and (2) the type declarations contain circular references (?)
- is the above understanding correct?
- is there a way to detect if it's needed?
- one potential way: use
ty to typecheck code without and with this import. if it fails without it and passes with it, it should be added.
Currently we seem to include
from __future__ import annotationsin all cases. But it should only be needed if (1) there are type declarations; and (2) the type declarations contain circular references (?)tyto typecheck code without and with this import. if it fails without it and passes with it, it should be added.