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

Fix overly strict type assertion #3988

Merged
merged 1 commit into from
May 13, 2024

Conversation

tybug
Copy link
Member

@tybug tybug commented May 13, 2024

Regressed in #3961. See recent failure https://github.com/HypothesisWorks/hypothesis/actions/runs/9066538054/job/24909659955 on 5983af0.

new_data can in fact be Overrun, though it is still safe to set data = new_data because data starts as > OVERRUN and we maintain a new_data.status >= data.status invariant.

Some annoying duplicated code here for the failed_mutations case to make the type checker happy...cleanest way I could find to do it, but possibly a better way exists.

@tybug tybug requested a review from Zac-HD as a code owner May 13, 2024 17:19
@tybug tybug force-pushed the fix-type-assertion branch 2 times, most recently from fa096d2 to beaaa3c Compare May 13, 2024 17:26
Copy link
Member

@Zac-HD Zac-HD left a comment

Choose a reason for hiding this comment

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

thanks!

@Zac-HD Zac-HD enabled auto-merge May 13, 2024 17:39
@Zac-HD Zac-HD merged commit 57e1fc1 into HypothesisWorks:master May 13, 2024
52 of 53 checks passed
@tybug tybug deleted the fix-type-assertion branch May 13, 2024 17:58
@qthequartermasterman
Copy link
Contributor

Thank you for correcting my mistake!

@tybug
Copy link
Member Author

tybug commented May 14, 2024

Thanks for taking on the typing pull in the first place! 😄 Issues like this are bound to fall out of changes like that.

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.

None yet

3 participants