File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change 66from collections import defaultdict , deque
77from pprint import pformat
88from textwrap import dedent , indent
9+ from typing import ClassVar
910import heapq
1011import itertools
1112
2021
2122
2223class _Error (Exception ):
24+
25+ _word_for_schema_in_error_message : ClassVar [str ]
26+ _word_for_instance_in_error_message : ClassVar [str ]
27+
2328 def __init__ (
2429 self ,
25- message ,
30+ message : str ,
2631 validator = _unset ,
2732 path = (),
2833 cause = None ,
@@ -328,6 +333,7 @@ def by_relevance(weak=WEAK_MATCHES, strong=STRONG_MATCHES):
328333 a collection of validation keywords to consider to be
329334 "strong"
330335 """
336+
331337 def relevance (error ):
332338 validator = error .validator
333339 return (
@@ -336,6 +342,7 @@ def relevance(error):
336342 validator in strong ,
337343 not error ._matches_type (),
338344 )
345+
339346 return relevance
340347
341348
You can’t perform that action at this time.
0 commit comments