File tree Expand file tree Collapse file tree 2 files changed +2
-3
lines changed Expand file tree Collapse file tree 2 files changed +2
-3
lines changed Original file line number Diff line number Diff line change 5
5
certain input types (#893)
6
6
* Cache reference lookups for subschemas (#893)
7
7
* Use cached lookups for resolving fragments if the referent document is known (#893)
8
+ * Replace the ``Validator.evolve `` method with an equivalent class attribute
8
9
* Implement a PEP544 Protocol for validator classes (#890)
9
10
10
11
v4.2.1
Original file line number Diff line number Diff line change @@ -169,6 +169,7 @@ class Validator:
169
169
schema = attr .ib (repr = reprlib .repr )
170
170
resolver = attr .ib (default = None , repr = False )
171
171
format_checker = attr .ib (default = None )
172
+ evolve = attr .evolve
172
173
173
174
def __attrs_post_init__ (self ):
174
175
if self .resolver is None :
@@ -182,9 +183,6 @@ def check_schema(cls, schema):
182
183
for error in cls (cls .META_SCHEMA ).iter_errors (schema ):
183
184
raise exceptions .SchemaError .create_from (error )
184
185
185
- def evolve (self , ** kwargs ):
186
- return attr .evolve (self , ** kwargs )
187
-
188
186
def iter_errors (self , instance , _schema = None ):
189
187
if _schema is not None :
190
188
warnings .warn (
You can’t perform that action at this time.
0 commit comments