-
Notifications
You must be signed in to change notification settings - Fork 591
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 hints to strategies.py
#4259
Conversation
@property | ||
def has_reusable_values(self) -> Any: | ||
return recursive_property(self, "has_reusable_values", True) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
using explicit @property
for mypyc, but I think it's also cleaner
count = 0 | ||
seen = set() | ||
while needs_update: | ||
count += 1 | ||
# If we seem to be taking a really long time to stabilize we | ||
# start tracking seen values to attempt to detect an infinite | ||
# loop. This should be impossible, and most code will never | ||
# hit the count, but having an assertion for it means that | ||
# testing is easier to debug and we don't just have a hung | ||
# test. | ||
# Note: This is actually covered, by test_very_deep_deferral | ||
# in tests/cover/test_deferred_strategies.py. Unfortunately it | ||
# runs into a coverage bug. See | ||
# https://github.com/nedbat/coveragepy/issues/605 | ||
# for details. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A check for an impossible case, which nonetheless has a test, except also a nocover pragma, due to an intractable upstream bug? Classic Hypothesis experience, nothing to see here...
I've tacked a bugfix on to this pull and fixed CI errors 👍 |
No description provided.