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

Allow context to deal with new style unions and add tests #436

Merged
merged 1 commit into from
Apr 26, 2024

Conversation

DominicOram
Copy link
Contributor

Fixes #432

Copy link

codecov bot commented Apr 25, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 89.40%. Comparing base (4d52871) to head (e4d11c5).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #436      +/-   ##
==========================================
+ Coverage   89.38%   89.40%   +0.01%     
==========================================
  Files          43       43              
  Lines        1800     1802       +2     
==========================================
+ Hits         1609     1611       +2     
  Misses        191      191              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
@DominicOram DominicOram force-pushed the 432_new_style_unions_failing branch from 233a9be to e4d11c5 Compare April 25, 2024 16:19
Copy link
Contributor

@callumforrester callumforrester left a comment

Choose a reason for hiding this comment

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

Thanks for looking at this! Happy to merge but see comment.

@@ -264,7 +257,7 @@ def _type_spec_for_function(
)
return new_args

def _convert_type(self, typ: type) -> type:
def _convert_type(self, typ: type | Any) -> type:
Copy link
Contributor

Choose a reason for hiding this comment

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

Should: We can get rid of the Any when mypy introduces the new, generic TypeForm: python/mypy#9773. There will be a PEP introduced at some point and hopefully TypeForm will be backported up to 3.10. Relatively minor change so unsure if a comment or an issue (or both) is most appropriate here, I'll let you decide.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added #437

@DominicOram DominicOram merged commit 4440433 into main Apr 26, 2024
24 checks passed
@DominicOram DominicOram deleted the 432_new_style_unions_failing branch April 26, 2024 09:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

with_plan_module() raises TypeError when experiment plan signature has a union type expression
2 participants