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

use py310 style union annotations #421

Merged
merged 1 commit into from
Jun 27, 2022
Merged

Conversation

seeM
Copy link
Contributor

@seeM seeM commented Jun 27, 2022

This changes eval_types to parse |-separated string annotations to Unions instead of tuples, which (1) fixes @patch and @typedispatch when using py310 style union annotations in Python 3.10 without importing future annotations, and (2) is required by #415. It is still compatible with the tuple style.

It also changes all tuple style annotations to py310 style. I found these using ripgrep with rg --multiline -t jupyter -t py '\([^\(\)]*:\s*\(.*'.

cc @hamelsmu @jph00

@review-notebook-app
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@seeM seeM marked this pull request as ready for review June 27, 2022 10:03
@seeM
Copy link
Contributor Author

seeM commented Jun 27, 2022

@jph00 this is ready for review. This changes eval_types to parse |-separated string annotations to Unions instead of tuples, which (1) fixes @patch and @typedispatch when using py310 style union annotations in Python 3.10 without importing future annotations, and (2) is required by #415. It is still compatible with the tuple style.

It also changes all tuple style annotations to py310 style. I found these using ripgrep with rg --multiline -t jupyter -t py '\([^\(\)]*:\s*\(.*'.

@jph00 jph00 merged commit 2fa2a63 into AnswerDotAI:master Jun 27, 2022
@jph00
Copy link
Contributor

jph00 commented Jun 27, 2022

Thank you!

@jph00 jph00 added the enhancement New feature or request label Jun 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants