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

Bug: gt and lt is not handled properly for floats #392

Open
1 of 4 tasks
guacs opened this issue Sep 27, 2023 · 0 comments
Open
1 of 4 tasks

Bug: gt and lt is not handled properly for floats #392

guacs opened this issue Sep 27, 2023 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@guacs
Copy link
Member

guacs commented Sep 27, 2023

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)

Funding

  • If you would like to see an issue prioritized, make a pledge towards it!
  • We receive the pledge once the issue is completed & verified
Fund with Polar
@guacs guacs added the bug Something isn't working label Sep 27, 2023
@guacs guacs changed the title Bug: gt is not handled properly for floats Bug: gt and lt is not handled properly for floats Sep 27, 2023
@guacs guacs self-assigned this Sep 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant