Skip to content

Add more type hints#4252

Merged
Liam-DeVoe merged 5 commits intoHypothesisWorks:masterfrom
Liam-DeVoe:more-typing
Jan 25, 2025
Merged

Add more type hints#4252
Liam-DeVoe merged 5 commits intoHypothesisWorks:masterfrom
Liam-DeVoe:more-typing

Conversation

@Liam-DeVoe
Copy link
Copy Markdown
Member

No description provided.

Comment on lines +1436 to +1439
cast(ConjectureResult, result).ir_nodes
for key in self.__data_cache
if (result := self.__data_cache[key]).status is Status.VALID
and startswith(result.ir_nodes, prefix)
and startswith(cast(ConjectureResult, result).ir_nodes, prefix)
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I think we can make this better with a is_valid(data: ConjectureResult | Overrun) -> TypeGuard[ConjectureResult] in the future

Copy link
Copy Markdown
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.

onwards!

@Liam-DeVoe Liam-DeVoe merged commit 93fe3f7 into HypothesisWorks:master Jan 25, 2025
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.

2 participants