It’s not quite like “just store the strings”. The implementation currently uses the same logic as STRING annotations and has to reconstruct the annotations in the same way.
However, it is intentionally meant to be opaque - if internally __annotate__(Format.STRING) were to provide the strings it would probably switch to using that. Although there is still the issue of needing to check VALUE_WITH_FAKE_GLOBALS that I’d really like to find a way to avoid.[1]
Edit: Also your link seems to be bad? - Should be Add a `Format.DEFERRED` option for PEP-649/749 annotations
It’s necessary to check this to make sure the context from the annotate function is actually the relevant context - a user function may provide
Format.STRINGbut may have a different context. The downside is this means even if you want strings, you evaluate the annotations - potentially triggering lazy imports. ↩︎