<p><span class="h-card" translate="no"><a href="https://ngmx.com/@pathunstrom" class="u-url mention">@<span>pathunstrom</span></a></span> I didn't know for sure, but I know everything "meta" is usually stored in dunder methods, so I did this in a shell:</p><p>In [1]: def f(arg: int) -> str:<br /> ...: return str(arg)<br /> ...: </p><p>In [2]: [attr for attr in dir(f) if attr.startswith('__')]<br />Out[2]: <br />['__annotations__',<br /> '__builtins__',<br /> '__call__',<br /> '__class__',<br /> ... ]</p><p>Conveniemtly, .__annotations__ is what you're looking for:</p><p>In [3]: f.__annotations__<br />Out[3]: {'arg': int, 'return': str}</p>