litestar-org / litestar-org/polyfactory
Bug: `gt` and `lt` is not handled properly for floats
Open
@vkcku is already working on this.
Since Sep 27, 2023.
bug
- Dominant language
- Python
- Stars
- 1.5k
- Forks
- 120
- PR merge metrics
- No merged PRs in 30d
Description
Description
See the MCVE.
URL to code causing the issue
No response
MCVE
from polyfactory.value_generators.constrained_numbers import get_increment, get_value_or_none
gt = 10.192
minimum, maximum = get_value_or_none(float, gt=gt)
assert minimum is not None and minimum > gt, f"{minimum=}"
Steps to reproduce
No response
Screenshots
No response
Logs
No response
Release Version
main
Platform
- Linux
- Mac
- Windows
- Other (Please specify in the description above)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.