Skip to content

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

@vkcku

Description

@vkcku

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)

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions