-
Notifications
You must be signed in to change notification settings - Fork 586
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
Provide SearchStrategy optionals #2765
Comments
|
Given that the shorthand st.none() | strategy # equivalent to `st.one_of(st.none(), strategy)`is already available to express this, I wouldn't think adding That being said, I do notice that @Zac-HD do you think adding an overload for the case of a two-argument invocation of (IGNORE ALL OF THE BELOW - MY IDE WASNT CONFIGURED CORRECTLY) Also, an aside... As I was playing with @MaxG87 's Any idea why the above signature might produce this confused annotation, @Zac-HD ? Perhaps something for us to point out to the pyright folks. |
|
The proposed shorthand is good for a single usage but cannot be reused. Having the If I had to use the shorthand, I either would have to duplicate the logic or predefine things like A very weak argument at last: The easiness of |
It also predates our API design guide, so. I'd still be inclined to accept it on the basis that
Looks like |

I noticed that I frequently write my own helper
optionals:Obviously, I use it to generate values for variables that either take a value or are
None.I wanted to ask if this coud be part of the strategies submodule. Then I could stop to copy that implementation from project to project. I expect it to be helpful for others too.
The text was updated successfully, but these errors were encountered: