litestar-org / litestar-org/polyfactory

Bug: `gt` and `lt` is not handled properly for floats

Open
#392 0 comments 0 reactions 1 assignee View on GitHub

@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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.