Skip to content

Commit 65bcd43

Browse files
committed
Remove type:ignore where appropriate
1 parent 49b17d0 commit 65bcd43

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

src/apispec/ext/marshmallow/field_converter.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff 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]}

0 commit comments

Comments
 (0)