Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork32k
gh-82129: Improve annotations for make_dataclass()#133406
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
…wt3u.rstCo-authored-by: Carl Meyer <carl@oddbird.net>
@@ -868,7 +868,7 @@ def get_annotations( | |||
# For FORWARDREF, we use __annotations__ if it exists | |||
try: | |||
ann = _get_dunder_annotations(obj) | |||
exceptNameError: | |||
exceptException: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
I made a separate PR (with tests) for this change in#133407.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Thank you for reviving this PR! It looks like it achieves its main goal.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
LGTM
bb5ec6e
intopython:mainUh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Closes#82129.Closes#122262.
This is on top of@sobolevn's#122262 but jumps through a few more hoops to achieve these goals:
make_dataclass()
are sensible in all formats