From 5371a4fc496f7aac59b1e70debe872a6ee69c1ef Mon Sep 17 00:00:00 2001 From: Shukurullo Mamadaliyev Date: Sun, 15 Mar 2026 16:21:03 +0500 Subject: [PATCH] Fix comments and type hints in models.py --- fastapi/openapi/models.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/fastapi/openapi/models.py b/fastapi/openapi/models.py index d7950241fc..755fcbb3bc 100644 --- a/fastapi/openapi/models.py +++ b/fastapi/openapi/models.py @@ -16,11 +16,11 @@ from typing_extensions import deprecated as typing_deprecated try: import email_validator - assert email_validator # make autoflake ignore the unused import + assert email_validator # Make autoflake ignore the unused import from pydantic import EmailStr -except ImportError: # pragma: no cover +except ImportError: # Pragma: no cover - class EmailStr(str): # type: ignore + class EmailStr(str): # Type: ignore @classmethod def __get_validators__(cls) -> Iterable[Callable[..., Any]]: yield cls.validate @@ -215,7 +215,7 @@ class Example(TypedDict, total=False): value: Any | None externalValue: AnyUrl | None - __pydantic_config__ = {"extra": "allow"} # type: ignore[misc] + __pydantic_config__ = {"extra": "allow"} # Type: ignore[misc] class ParameterInType(Enum):