Skip to content
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

gh-119180: Improvements to ForwardRef.evaluate #122210

Merged
merged 3 commits into from
Aug 11, 2024

Conversation

JelleZijlstra
Copy link
Member

@JelleZijlstra JelleZijlstra commented Jul 24, 2024

Noticed some issues while writing documentation for this method.

Noticed some issues while writing documentation for this method.
@@ -89,12 +89,10 @@ def evaluate(self, *, globals=None, locals=None, type_params=None, owner=None):
return value
if owner is None:
owner = self.__owner__
if type_params is None and owner is None:
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This check felt unnecessarily strict; many ForwardRefs can be evaluated correctly without worrying about type params.

@JelleZijlstra JelleZijlstra enabled auto-merge (squash) August 11, 2024 23:21
@JelleZijlstra JelleZijlstra merged commit 016f4b5 into python:main Aug 11, 2024
32 checks passed
blhsing pushed a commit to blhsing/cpython that referenced this pull request Aug 22, 2024
Noticed some issues while writing documentation for this method.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant