mirror of
https://github.com/python/cpython.git
synced 2025-09-26 10:19:53 +00:00
gh-114053: Fix bad interaction of PEP-695, PEP-563 and `get_type_hints
` (#118009)
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
This commit is contained in:
parent
15b3555e4a
commit
1e3e7ce11e
5 changed files with 81 additions and 10 deletions
|
@ -3024,7 +3024,9 @@ Introspection helpers
|
|||
|
||||
This is often the same as ``obj.__annotations__``. In addition,
|
||||
forward references encoded as string literals are handled by evaluating
|
||||
them in ``globals`` and ``locals`` namespaces. For a class ``C``, return
|
||||
them in ``globals``, ``locals`` and (where applicable)
|
||||
:ref:`type parameter <type-params>` namespaces.
|
||||
For a class ``C``, return
|
||||
a dictionary constructed by merging all the ``__annotations__`` along
|
||||
``C.__mro__`` in reverse order.
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue