Skip to content

Commit 79ae4a9

Browse files
authored
Merge pull request #1444 from Padmashree06/main
docs: Fix misleading comment in relevance function
2 parents a727743 + 0e5655c commit 79ae4a9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

jsonschema/exceptions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -415,7 +415,7 @@ def by_relevance(weak=WEAK_MATCHES, strong=STRONG_MATCHES):
415415
def relevance(error):
416416
validator = error.validator
417417
return ( # prefer errors which are ...
418-
-len(error.path), # 'deeper' and thereby more specific
418+
-len(error.path), # shorter path thereby more general
419419
error.path, # earlier (for sibling errors)
420420
validator not in weak, # for a non-low-priority keyword
421421
validator in strong, # for a high priority keyword

0 commit comments

Comments
 (0)