Commit cb6596c
authored
This check is potentially problematic because it could force evaluation of
annotations unnecessarily. This doesn't trigger for builtin objects (functions,
classes, or modules) with annotations, but it could trigger for third-party objects.
The check was not particularly useful anyway, because it succeeds if ``__annotations__``
is a dict or None, so the only thing this did was guard against objects that have an
``__annotations__`` attribute that is of some other type. That doesn't seem particularly
useful, so I just removed the check.
1 parent 1978904 commit cb6596cCopy full SHA for cb6596c
3 files changed
+34-3Lines changed: 34 additions & 3 deletions
File tree
Expand file treeCollapse file tree
Open diff view settings
Filter options
- Lib
- test/test_inspect
- Misc/NEWS.d/next/Library
Expand file treeCollapse file tree
Open diff view settings
Collapse file
+1-3Lines changed: 1 addition & 3 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
2074 | 2074 | |
2075 | 2075 | |
2076 | 2076 | |
2077 | | - |
2078 | 2077 | |
2079 | 2078 | |
2080 | 2079 | |
2081 | 2080 | |
2082 | | - |
2083 | | - |
| 2081 | + |
2084 | 2082 | |
2085 | 2083 | |
2086 | 2084 | |
|
Collapse file
Lib/test/test_inspect/test_inspect.py
Copy file name to clipboardExpand all lines: Lib/test/test_inspect/test_inspect.py+31Lines changed: 31 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
4997 | 4997 | |
4998 | 4998 | |
4999 | 4999 | |
| 5000 | + |
| 5001 | + |
| 5002 | + |
| 5003 | + |
| 5004 | + |
| 5005 | + |
| 5006 | + |
| 5007 | + |
| 5008 | + |
| 5009 | + |
| 5010 | + |
| 5011 | + |
| 5012 | + |
| 5013 | + |
| 5014 | + |
| 5015 | + |
| 5016 | + |
| 5017 | + |
| 5018 | + |
| 5019 | + |
| 5020 | + |
| 5021 | + |
| 5022 | + |
| 5023 | + |
| 5024 | + |
| 5025 | + |
| 5026 | + |
| 5027 | + |
| 5028 | + |
| 5029 | + |
| 5030 | + |
5000 | 5031 | |
5001 | 5032 | |
5002 | 5033 | |
|
Collapse file
Misc/NEWS.d/next/Library/2025-05-04-17-04-55.gh-issue-132493.huirKi.rst
Copy file name to clipboard+2Lines changed: 2 additions & 0 deletions
- Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
| 1 | + |
| 2 | + |
0 commit comments