Skip to content

Use first-party Hypothesis strategies from the st namespace #19

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

Closed
wants to merge 1 commit into from

Conversation

honno
Copy link
Member

@honno honno commented Sep 20, 2021

As discussed in #18, this PR simply removes all instances of from hypothesis.strategies import ... in favour of from hypothesis import strategies as st, so that first-party strategies are used like st.<strategy>.

If you like, I could go over the suite to aias _array_module as xp and only call array module objects/methods with xp.<attribute>. Even if _array_module is really just a wrapper, it may add more clarity overall. Likewise I can try namespacing hypothesis_helpers and array_helpers if you'd like.

@asmeurer
Copy link
Member

Sorry I didn't notice this PR for some reason. It has a few merge conflicts.

Is the idea with this to make it easier to distinguish between built-in hypothesis strategies and custom ones from hypothesis_helpers?

@honno honno marked this pull request as draft September 30, 2021 20:48
@honno
Copy link
Member Author

honno commented Sep 30, 2021

Is the idea with this to make it easier to distinguish between built-in hypothesis strategies and custom ones from hypothesis_helpers?

Yep. Meant it as a proof-of-concept to see how you feel. It's not a biggie!

@asmeurer
Copy link
Member

I'm really ambivalent either way. If this is something you feel would have helped you coming into the codebase then I am OK with it.

@honno honno closed this Oct 4, 2021
@honno honno deleted the namespace-strategies branch February 8, 2022 10:05
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