Skip to content

Commit ae3a97a

Browse files
committed
zeroTerminatedFloats.
That's a really annoying change...
1 parent a5ce527 commit ae3a97a

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

jsonschema/validators.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,8 +149,11 @@ def is_type(self, instance, type):
149149
raise UnknownType(type, instance, self.schema)
150150
pytypes = self._types[type]
151151

152+
# FIXME: draft < 6
153+
if isinstance(instance, float) and type == "integer":
154+
return instance.is_integer()
152155
# bool inherits from int, so ensure bools aren't reported as ints
153-
if isinstance(instance, bool):
156+
elif isinstance(instance, bool):
154157
pytypes = _utils.flatten(pytypes)
155158
is_number = any(
156159
issubclass(pytype, numbers.Number) for pytype in pytypes

0 commit comments

Comments
 (0)