Skip to content

Commit 0865bfb

Browse files
committed
No idea why this call to float was here.
Fix large precision comparisions (even for ints). Closes #166
1 parent bea28e9 commit 0865bfb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

jsonschema/_validators.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,10 +94,10 @@ def maximum(validator, maximum, instance, schema):
9494
return
9595

9696
if schema.get("exclusiveMaximum", False):
97-
failed = float(instance) >= maximum
97+
failed = instance >= maximum
9898
cmp = "greater than or equal to"
9999
else:
100-
failed = float(instance) > maximum
100+
failed = instance > maximum
101101
cmp = "greater than"
102102

103103
if failed:

0 commit comments

Comments
 (0)