From a5e0a3d8fd219dff2d6f0fa276dfc176c41645da Mon Sep 17 00:00:00 2001 From: Tamir Duberstein Date: Tue, 7 May 2024 12:30:46 -0400 Subject: [PATCH] Remove unused suppressions --- fastapi/_compat.py | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/fastapi/_compat.py b/fastapi/_compat.py index c07e4a3b0..3cede67f8 100644 --- a/fastapi/_compat.py +++ b/fastapi/_compat.py @@ -69,7 +69,7 @@ if PYDANTIC_V2: ) except ImportError: # pragma: no cover from pydantic_core.core_schema import ( - general_plain_validator_function as with_info_plain_validator_function, # noqa: F401 + general_plain_validator_function as with_info_plain_validator_function, ) RequiredParam = PydanticUndefined @@ -291,14 +291,14 @@ else: from fastapi.openapi.constants import REF_PREFIX as REF_PREFIX from pydantic import AnyUrl as Url # noqa: F401 from pydantic import ( # type: ignore[assignment] - BaseConfig as BaseConfig, # noqa: F401 + BaseConfig as BaseConfig, ) - from pydantic import ValidationError as ValidationError # noqa: F401 + from pydantic import ValidationError as ValidationError from pydantic.class_validators import ( # type: ignore[no-redef] - Validator as Validator, # noqa: F401 + Validator as Validator, ) from pydantic.error_wrappers import ( # type: ignore[no-redef] - ErrorWrapper as ErrorWrapper, # noqa: F401 + ErrorWrapper as ErrorWrapper, ) from pydantic.errors import MissingError from pydantic.fields import ( # type: ignore[attr-defined] @@ -312,7 +312,7 @@ else: ) from pydantic.fields import FieldInfo as FieldInfo from pydantic.fields import ( # type: ignore[no-redef,attr-defined] - ModelField as ModelField, # noqa: F401 + ModelField as ModelField, ) # Keeping old "Required" functionality from Pydantic V1, without @@ -322,7 +322,7 @@ else: Undefined as Undefined, ) from pydantic.fields import ( # type: ignore[no-redef, attr-defined] - UndefinedType as UndefinedType, # noqa: F401 + UndefinedType as UndefinedType, ) from pydantic.schema import ( field_schema, @@ -330,14 +330,14 @@ else: get_model_name_map, model_process_schema, ) - from pydantic.schema import ( # type: ignore[no-redef] # noqa: F401 + from pydantic.schema import ( # type: ignore[no-redef] get_annotation_from_field_info as get_annotation_from_field_info, ) from pydantic.typing import ( # type: ignore[no-redef] - evaluate_forwardref as evaluate_forwardref, # noqa: F401 + evaluate_forwardref as evaluate_forwardref, ) from pydantic.utils import ( # type: ignore[no-redef] - lenient_issubclass as lenient_issubclass, # noqa: F401 + lenient_issubclass as lenient_issubclass, ) GetJsonSchemaHandler = Any # type: ignore[assignment,misc]