Skip to content

Commit 1085b27

Browse files
committed
Ensure all items of array are checked for uniqueness
Fix bug where the function would return (True) early if the first two items of the array are unique, preventing verification of other array items.
1 parent 64622fd commit 1085b27

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

jsonschema/_utils.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,8 @@ def uniq(container):
188188
sliced = itertools.islice(sort, 1, None)
189189

190190
for i, j in zip(sort, sliced):
191-
return not _sequence_equal(i, j)
191+
if _sequence_equal(i, j):
192+
return False
192193

193194
except (NotImplementedError, TypeError):
194195
seen = []

0 commit comments

Comments
 (0)