-
Notifications
You must be signed in to change notification settings - Fork 587
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
Add type annotations to hypothesis.internal.conjecture
#3074
Comments
Adding the https://glyph.twistedmatrix.com/2022/04/you-should-compile-your-python-and-heres-why.html suggests that this might be a big win. https://ichard26.github.io/blog/2022/05/31/compiling-black-with-mypyc-part-1/ walks through the process of applying |
In #3336, Adrian spells out the precise steps:
Once we have all of |
A couple notes from the first round of typing.
|
The low-level engine behind Hypothesis is
hypothesis.internal.conjecture
. While well-commented, it can also be tricky to follow in places and I think that type annotations would make it easier to understand - especially with the variety of things called "data"!This would be particularly valuable now because we're thinking about refactoring
conjecture
to add a "mid-level IR", which would improve our ability to detect redundancy (i.e. #1986 but more so) and support better integration with Crosshair.Using a tool like MonkeyType to derive initial annotations from our tests would be pretty neat, though we'll still need careful review.
autotype
might be a better starting point, since it's fully static rather than using potentially-incomplete runtime data.The text was updated successfully, but these errors were encountered: