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 6
6
from collections import defaultdict , deque
7
7
from pprint import pformat
8
8
from textwrap import dedent , indent
9
+ from typing import ClassVar
9
10
import heapq
10
11
import itertools
11
12
20
21
21
22
22
23
class _Error (Exception ):
24
+
25
+ _word_for_schema_in_error_message : ClassVar [str ]
26
+ _word_for_instance_in_error_message : ClassVar [str ]
27
+
23
28
def __init__ (
24
29
self ,
25
- message ,
30
+ message : str ,
26
31
validator = _unset ,
27
32
path = (),
28
33
cause = None ,
@@ -328,6 +333,7 @@ def by_relevance(weak=WEAK_MATCHES, strong=STRONG_MATCHES):
328
333
a collection of validation keywords to consider to be
329
334
"strong"
330
335
"""
336
+
331
337
def relevance (error ):
332
338
validator = error .validator
333
339
return (
@@ -336,6 +342,7 @@ def relevance(error):
336
342
validator in strong ,
337
343
not error ._matches_type (),
338
344
)
345
+
339
346
return relevance
340
347
341
348
You can’t perform that action at this time.
0 commit comments