Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Document DataObject.draw and rename other members with leading underscore #4170

Open
jakkdl opened this issue Nov 11, 2024 · 0 comments
Open
Labels
legibility make errors helpful and Hypothesis grokable

Comments

@jakkdl
Copy link
Contributor

jakkdl commented Nov 11, 2024

it seems like draw() is the only publicly documented member of DataObject (although only indirectly at https://hypothesis.readthedocs.io/en/latest/data.html#hypothesis.strategies.data). The DataObject class was previously internal but exposed with https://hypothesis.readthedocs.io/en/latest/changes.html#v4-22-3.

Reading the class def further it does hide __signature__ and warns in the docstring not to use it, so perhaps the only way to find out about .conjecture_data is from reading code elsewhere referring to it, but nonetheless it would make reading code that messes with conjecture_data or count a bit clearer.

I don't see why .draw() should be undocumented in the object and the signature hidden, this seems unfriendly to type checkers and tab completion.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
legibility make errors helpful and Hypothesis grokable
Projects
None yet
Development

No branches or pull requests

2 participants