Skip to content
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

fix: random sign when +ve is false #1953

Closed
wants to merge 0 commits into from

Conversation

viraj-s15
Copy link
Contributor

What does this change

When using print(f.pyfloat(positive=False)) , the number could be positive or negative.
Now when positive is false, only negative numbers would be returned.

What was wrong

Both negative and positive being returned. The code also seemed to not be format by isort (or maybe something wrong on my end). I did run isort though.

How this fixes it

Removed randomly picking a sign if positive is false

Fixes #1928

Now this could be intended, if it was, maintainers, please let me know, I would love to implement the random sign functionality but that would require changing the function arguments and tests.

All the tests pass on python 3.11

image

@stefan6419846
Copy link
Contributor

I would argue against mixing this lot of formatting changes with your actual fix, as this makes it hard to actually spot the relevant changes.

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.

pyfloat ignores the positive kwarg
2 participants