The datamodel says I should expect annotations to be available as either object.__annotation__ or object.__annotate__,: 3. Data model — Python 3.14.0 documentation
This appears to be wrong, and I’m not sure if it’s a documentation error or a released python version error, but since the pep text matches the data model text…
>>> class A:
... x: int
...
>>> dir(A)
['__annotate_func__', '__class__', '__delattr__', '__dict__', '__dir__', '__doc__', '__eq__', '__firstlineno__', '__format__', '__ge__', '__getattribute__', '__getstate__', '__gt__', '__hash__', '__init__', '__init_subclass__', '__le__', '__lt__', '__module__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__static_attributes__', '__str__', '__subclasshook__', '__weakref__']
__annotate_func__ is available, isn’t documented in the datamodel, but appears to correspond with __annotate__'s documented behavior. This function raises NotImplemented for 3 (Forwardref) and 4 (String) (see documentation of values here)
which is significantly less compatible than was promised with existing codebases using from __future__ import annotations
Not sure what the path forward here is on this one.