8000 gh-125618: Make FORWARDREF format succeed more often by JelleZijlstra · Pull Request #132818 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-125618: Make FORWARDREF format succeed more often #132818

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 11 commits into from
May 4, 2025
Prev Previous commit
Next Next commit
add test
  • Loading branch information
JelleZijlstra committed Apr 23, 2025
commit d27ffd8943926411b38fb9ff7504e16d4fa1b3d9
7 changes: 7 additions & 0 deletions Lib/test/test_annotationlib.py
Original file line number Diff line number Diff line change
Expand Up @@ -1124,6 +1124,13 @@ def f(
},
)

def test_partial_evaluation_cell(self):
obj = object()
class RaisesAttributeError:
attriberr: obj.missing
anno = get_annotations(RaisesAttributeError, format=Format.FORWARDREF)
self.assertEqual(anno, None)


class TestCallEvaluateFunction(unittest.TestCase):
def test_evaluation(self):
Expand Down
Loading
0