summaryrefslogtreecommitdiffstats
path: root/Lib/test/inspect_stringized_annotations.py
Commit message (Collapse)AuthorAgeFilesLines
* [3.12] gh-108303: Move all inspect test files to `test_inspect/` (GH-109607) ↵Nikita Sobolev2023-10-131-34/+0
| | | | | (#110732) (cherry picked from commit 732532b0af9d1b5c7ae4932526c8d20d86c15507)
* bpo-43817: Add inspect.get_annotations(). (#25522)larryhastings2021-04-301-0/+34
Add inspect.get_annotations, which safely computes the annotations defined on an object. It works around the quirks of accessing the annotations from various types of objects, and makes very few assumptions about the object passed in. inspect.get_annotations can also correctly un-stringize stringized annotations. inspect.signature, inspect.from_callable, and inspect.from_function now call inspect.get_annotations to retrieve annotations. This means inspect.signature and inspect.from_callable can now un-stringize stringized annotations, too.