You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
faker.pyfloat()'s min_value and max_value no longer accepts floats; ints work. This is despite the documentation stating that floats are valid datatypes for the min_value and max_value params.
output should be a float between 0.01 and 999999999.99
Actual behavior
output does not include floats below 1 or above the max value.
Relevant error:
File "/usr/src/app/contracts/management/commands/populate_contracts.py", line 42, in handle
"currency_value": faker.pyfloat(
^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/faker/providers/python/__init__.py", line 133, in pyfloat
left_number = self._safe_random_int(
^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/faker/providers/python/__init__.py", line 172, in _safe_random_int
return self.random_int(min_value, max_value - 1)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/faker/providers/__init__.py", line 316, in random_int
return self.generator.random.randrange(min, max + 1, step)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/random.py", line 312, in randrange
istop = _index(stop)
^^^^^^^^^^^^
TypeError: 'float' object cannot be interpreted as an integer
The text was updated successfully, but these errors were encountered:
Brief summary of the issue goes here.
faker.pyfloat()'s min_value and max_value no longer accepts floats; ints work. This is despite the documentation stating that floats are valid datatypes for the min_value and max_value params.
Expected behavior
output should be a float between 0.01 and 999999999.99
Actual behavior
output does not include floats below 1 or above the max value.
Relevant error:
The text was updated successfully, but these errors were encountered: