From 69b1da434fc6eba7e205c0169a935635d5fe84d9 Mon Sep 17 00:00:00 2001 From: Steven Loria Date: Tue, 9 Jan 2024 22:26:43 -0500 Subject: [PATCH] Remove lint errors --- tests/utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/utils.py b/tests/utils.py index 7f789781..ef8efd5a 100644 --- a/tests/utils.py +++ b/tests/utils.py @@ -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 @@ -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: