File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed
src/apispec/ext/marshmallow Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -239,15 +239,15 @@ def field2choices(
239239 attributes = {}
240240
241241 comparable = [
242- validator .comparable # type:ignore
242+ validator .comparable
243243 for validator in field .validators
244244 if hasattr (validator , "comparable" )
245245 ]
246246 if comparable :
247247 attributes ["enum" ] = comparable
248248 else :
249249 choices = [
250- OrderedSet (validator .choices ) # type:ignore
250+ OrderedSet (validator .choices )
251251 for validator in field .validators
252252 if hasattr (validator , "choices" )
253253 ]
@@ -348,9 +348,7 @@ def field2length(
348348 max_attr = "maxItems" if is_array else "maxLength"
349349
350350 equal_list = [
351- validator .equal # type:ignore
352- for validator in validators
353- if validator .equal is not None # type:ignore
351+ validator .equal for validator in validators if validator .equal is not None
354352 ]
355353 if equal_list :
356354 return {min_attr : equal_list [0 ], max_attr : equal_list [0 ]}
You can’t perform that action at this time.
0 commit comments