-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Pyfloat raises TypeError for None min or max value #1907
Comments
Thank you for the report! Do you have time to work on a Pull Request? |
Hi @fcurella, can you assign this to me please. I would like to take this up |
No need to assign anyone here - just open a corresponding PR with your proposed fix/enhancement. |
This issue is stale because it has been open for 30 days with no activity. |
This issue was closed because it has been inactive for 14 days since being marked as stale. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When calling
pyfloat
with amax_value
ofNone
and amin_value
, then the method sometimes raisesunsupported operand type(s) for -: 'NoneType' and 'float'
Steps to reproduce
Run the following code
Expected behavior
There should be no exception printed.
Actual behavior
I dug into the code a little and it looks to me like the issue with the code is here:
Specifically the
self.generator.random.uniform(0, max_value - min_value)
as the code is not handling the case wheremax_value
ormin_value
isNone
.If it is
None
it should probably be handled in an extraif
clause.The text was updated successfully, but these errors were encountered: