Skip to content

Commit

Permalink
Remove lint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
sloria committed Jan 10, 2024
1 parent 0235aaa commit 69b1da4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/utils.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
"""Utilities to get elements of generated spec"""
from typing import cast
import openapi_spec_validator
from openapi_spec_validator.exceptions import OpenAPISpecValidatorError

Expand Down Expand Up @@ -57,7 +56,8 @@ def validate_spec(spec: APISpec) -> bool:
:raise: apispec.exceptions.OpenAPIError if validation fails.
"""
try:
openapi_spec_validator.validate(spec.to_dict())
# Coerce to dict to satisfy Pyright
openapi_spec_validator.validate(dict(spec.to_dict()))
except OpenAPISpecValidatorError as err:
raise exceptions.OpenAPIError(*err.args) from err
else:
Expand Down

0 comments on commit 69b1da4

Please sign in to comment.