From eee7458f2f5c6673b1ccad8f52dd67b75a7cc435 Mon Sep 17 00:00:00 2001 From: svlandeg Date: Tue, 10 Mar 2026 22:11:54 +0100 Subject: [PATCH] add ignore for _Unset default values --- fastapi/param_functions.py | 112 ++++++++++++++++---------------- fastapi/params.py | 128 ++++++++++++++++++------------------- 2 files changed, 120 insertions(+), 120 deletions(-) diff --git a/fastapi/param_functions.py b/fastapi/param_functions.py index d3edde2682..50e54e4417 100644 --- a/fastapi/param_functions.py +++ b/fastapi/param_functions.py @@ -34,7 +34,7 @@ def Path( # noqa: N802 The parameter is available only for compatibility. """ ), - ] = _Unset, + ] = _Unset, # ty: ignore[invalid-parameter-default] alias: Annotated[ str | None, Doc( @@ -54,7 +54,7 @@ def Path( # noqa: N802 Priority of the alias. This affects whether an alias generator is used. """ ), - ] = _Unset, + ] = _Unset, # ty: ignore[invalid-parameter-default] validation_alias: Annotated[ str | AliasPath | AliasChoices | None, Doc( @@ -190,7 +190,7 @@ def Path( # noqa: N802 If `True`, strict validation is applied to the field. """ ), - ] = _Unset, + ] = _Unset, # ty: ignore[invalid-parameter-default] multiple_of: Annotated[ float | None, Doc( @@ -198,7 +198,7 @@ def Path( # noqa: N802 Value must be a multiple of this. Only applicable to numbers. """ ), - ] = _Unset, + ] = _Unset, # ty: ignore[invalid-parameter-default] allow_inf_nan: Annotated[ bool | None, Doc( @@ -206,7 +206,7 @@ def Path( # noqa: N802 Allow `inf`, `-inf`, `nan`. Only applicable to numbers. """ ), - ] = _Unset, + ] = _Unset, # ty: ignore[invalid-parameter-default] max_digits: Annotated[ int | None, Doc( @@ -214,7 +214,7 @@ def Path( # noqa: N802 Maximum number of digits allowed for decimal values. """ ), - ] = _Unset, + ] = _Unset, # ty: ignore[invalid-parameter-default] decimal_places: Annotated[ int | None, Doc( @@ -222,7 +222,7 @@ def Path( # noqa: N802 Maximum number of decimal places allowed for decimal values. """ ), - ] = _Unset, + ] = _Unset, # ty: ignore[invalid-parameter-default] examples: Annotated[ list[Any] | None, Doc( @@ -240,7 +240,7 @@ def Path( # noqa: N802 "Deprecated in OpenAPI 3.1.0 that now uses JSON Schema 2020-12, " "although still supported. Use examples instead." ), - ] = _Unset, + ] = _Unset, # ty: ignore[invalid-parameter-default] openapi_examples: Annotated[ dict[str, Example] | None, Doc( @@ -378,7 +378,7 @@ def Query( # noqa: N802 The parameter is available only for compatibility. """ ), - ] = _Unset, + ] = _Unset, # ty: ignore[invalid-parameter-default] alias: Annotated[ str | None, Doc( @@ -401,7 +401,7 @@ def Query( # noqa: N802 Priority of the alias. This affects whether an alias generator is used. """ ), - ] = _Unset, + ] = _Unset, # ty: ignore[invalid-parameter-default] validation_alias: Annotated[ str | AliasPath | AliasChoices | None, Doc( @@ -549,7 +549,7 @@ def Query( # noqa: N802 If `True`, strict validation is applied to the field. """ ), - ] = _Unset, + ] = _Unset, # ty: ignore[invalid-parameter-default] multiple_of: Annotated[ float | None, Doc( @@ -557,7 +557,7 @@ def Query( # noqa: N802 Value must be a multiple of this. Only applicable to numbers. """ ), - ] = _Unset, + ] = _Unset, # ty: ignore[invalid-parameter-default] allow_inf_nan: Annotated[ bool | None, Doc( @@ -565,7 +565,7 @@ def Query( # noqa: N802 Allow `inf`, `-inf`, `nan`. Only applicable to numbers. """ ), - ] = _Unset, + ] = _Unset, # ty: ignore[invalid-parameter-default] max_digits: Annotated[ int | None, Doc( @@ -573,7 +573,7 @@ def Query( # noqa: N802 Maximum number of digits allowed for decimal values. """ ), - ] = _Unset, + ] = _Unset, # ty: ignore[invalid-parameter-default] decimal_places: Annotated[ int | None, Doc( @@ -581,7 +581,7 @@ def Query( # noqa: N802 Maximum number of decimal places allowed for decimal values. """ ), - ] = _Unset, + ] = _Unset, # ty: ignore[invalid-parameter-default] examples: Annotated[ list[Any] | None, Doc( @@ -599,7 +599,7 @@ def Query( # noqa: N802 "Deprecated in OpenAPI 3.1.0 that now uses JSON Schema 2020-12, " "although still supported. Use examples instead." ), - ] = _Unset, + ] = _Unset, # ty: ignore[invalid-parameter-default] openapi_examples: Annotated[ dict[str, Example] | None, Doc( @@ -719,7 +719,7 @@ def Header( # noqa: N802 The parameter is available only for compatibility. """ ), - ] = _Unset, + ] = _Unset, # ty: ignore[invalid-parameter-default] alias: Annotated[ str | None, Doc( @@ -739,7 +739,7 @@ def Header( # noqa: N802 Priority of the alias. This affects whether an alias generator is used. """ ), - ] = _Unset, + ] = _Unset, # ty: ignore[invalid-parameter-default] validation_alias: Annotated[ str | AliasPath | AliasChoices | None, Doc( @@ -871,7 +871,7 @@ def Header( # noqa: N802 If `True`, strict validation is applied to the field. """ ), - ] = _Unset, + ] = _Unset, # ty: ignore[invalid-parameter-default] multiple_of: Annotated[ float | None, Doc( @@ -879,7 +879,7 @@ def Header( # noqa: N802 Value must be a multiple of this. Only applicable to numbers. """ ), - ] = _Unset, + ] = _Unset, # ty: ignore[invalid-parameter-default] allow_inf_nan: Annotated[ bool | None, Doc( @@ -887,7 +887,7 @@ def Header( # noqa: N802 Allow `inf`, `-inf`, `nan`. Only applicable to numbers. """ ), - ] = _Unset, + ] = _Unset, # ty: ignore[invalid-parameter-default] max_digits: Annotated[ int | None, Doc( @@ -895,7 +895,7 @@ def Header( # noqa: N802 Maximum number of digits allowed for decimal values. """ ), - ] = _Unset, + ] = _Unset, # ty: ignore[invalid-parameter-default] decimal_places: Annotated[ int | None, Doc( @@ -903,7 +903,7 @@ def Header( # noqa: N802 Maximum number of decimal places allowed for decimal values. """ ), - ] = _Unset, + ] = _Unset, # ty: ignore[invalid-parameter-default] examples: Annotated[ list[Any] | None, Doc( @@ -921,7 +921,7 @@ def Header( # noqa: N802 "Deprecated in OpenAPI 3.1.0 that now uses JSON Schema 2020-12, " "although still supported. Use examples instead." ), - ] = _Unset, + ] = _Unset, # ty: ignore[invalid-parameter-default] openapi_examples: Annotated[ dict[str, Example] | None, Doc( @@ -1036,7 +1036,7 @@ def Cookie( # noqa: N802 The parameter is available only for compatibility. """ ), - ] = _Unset, + ] = _Unset, # ty: ignore[invalid-parameter-default] alias: Annotated[ str | None, Doc( @@ -1056,7 +1056,7 @@ def Cookie( # noqa: N802 Priority of the alias. This affects whether an alias generator is used. """ ), - ] = _Unset, + ] = _Unset, # ty: ignore[invalid-parameter-default] validation_alias: Annotated[ str | AliasPath | AliasChoices | None, Doc( @@ -1177,7 +1177,7 @@ def Cookie( # noqa: N802 If `True`, strict validation is applied to the field. """ ), - ] = _Unset, + ] = _Unset, # ty: ignore[invalid-parameter-default] multiple_of: Annotated[ float | None, Doc( @@ -1185,7 +1185,7 @@ def Cookie( # noqa: N802 Value must be a multiple of this. Only applicable to numbers. """ ), - ] = _Unset, + ] = _Unset, # ty: ignore[invalid-parameter-default] allow_inf_nan: Annotated[ bool | None, Doc( @@ -1193,7 +1193,7 @@ def Cookie( # noqa: N802 Allow `inf`, `-inf`, `nan`. Only applicable to numbers. """ ), - ] = _Unset, + ] = _Unset, # ty: ignore[invalid-parameter-default] max_digits: Annotated[ int | None, Doc( @@ -1201,7 +1201,7 @@ def Cookie( # noqa: N802 Maximum number of digits allowed for decimal values. """ ), - ] = _Unset, + ] = _Unset, # ty: ignore[invalid-parameter-default] decimal_places: Annotated[ int | None, Doc( @@ -1209,7 +1209,7 @@ def Cookie( # noqa: N802 Maximum number of decimal places allowed for decimal values. """ ), - ] = _Unset, + ] = _Unset, # ty: ignore[invalid-parameter-default] examples: Annotated[ list[Any] | None, Doc( @@ -1227,7 +1227,7 @@ def Cookie( # noqa: N802 "Deprecated in OpenAPI 3.1.0 that now uses JSON Schema 2020-12, " "although still supported. Use examples instead." ), - ] = _Unset, + ] = _Unset, # ty: ignore[invalid-parameter-default] openapi_examples: Annotated[ dict[str, Example] | None, Doc( @@ -1341,7 +1341,7 @@ def Body( # noqa: N802 The parameter is available only for compatibility. """ ), - ] = _Unset, + ] = _Unset, # ty: ignore[invalid-parameter-default] embed: Annotated[ bool | None, Doc( @@ -1384,7 +1384,7 @@ def Body( # noqa: N802 Priority of the alias. This affects whether an alias generator is used. """ ), - ] = _Unset, + ] = _Unset, # ty: ignore[invalid-parameter-default] validation_alias: Annotated[ str | AliasPath | AliasChoices | None, Doc( @@ -1505,7 +1505,7 @@ def Body( # noqa: N802 If `True`, strict validation is applied to the field. """ ), - ] = _Unset, + ] = _Unset, # ty: ignore[invalid-parameter-default] multiple_of: Annotated[ float | None, Doc( @@ -1513,7 +1513,7 @@ def Body( # noqa: N802 Value must be a multiple of this. Only applicable to numbers. """ ), - ] = _Unset, + ] = _Unset, # ty: ignore[invalid-parameter-default] allow_inf_nan: Annotated[ bool | None, Doc( @@ -1521,7 +1521,7 @@ def Body( # noqa: N802 Allow `inf`, `-inf`, `nan`. Only applicable to numbers. """ ), - ] = _Unset, + ] = _Unset, # ty: ignore[invalid-parameter-default] max_digits: Annotated[ int | None, Doc( @@ -1529,7 +1529,7 @@ def Body( # noqa: N802 Maximum number of digits allowed for decimal values. """ ), - ] = _Unset, + ] = _Unset, # ty: ignore[invalid-parameter-default] decimal_places: Annotated[ int | None, Doc( @@ -1537,7 +1537,7 @@ def Body( # noqa: N802 Maximum number of decimal places allowed for decimal values. """ ), - ] = _Unset, + ] = _Unset, # ty: ignore[invalid-parameter-default] examples: Annotated[ list[Any] | None, Doc( @@ -1555,7 +1555,7 @@ def Body( # noqa: N802 "Deprecated in OpenAPI 3.1.0 that now uses JSON Schema 2020-12, " "although still supported. Use examples instead." ), - ] = _Unset, + ] = _Unset, # ty: ignore[invalid-parameter-default] openapi_examples: Annotated[ dict[str, Example] | None, Doc( @@ -1671,7 +1671,7 @@ def Form( # noqa: N802 The parameter is available only for compatibility. """ ), - ] = _Unset, + ] = _Unset, # ty: ignore[invalid-parameter-default] media_type: Annotated[ str, Doc( @@ -1700,7 +1700,7 @@ def Form( # noqa: N802 Priority of the alias. This affects whether an alias generator is used. """ ), - ] = _Unset, + ] = _Unset, # ty: ignore[invalid-parameter-default] validation_alias: Annotated[ str | AliasPath | AliasChoices | None, Doc( @@ -1821,7 +1821,7 @@ def Form( # noqa: N802 If `True`, strict validation is applied to the field. """ ), - ] = _Unset, + ] = _Unset, # ty: ignore[invalid-parameter-default] multiple_of: Annotated[ float | None, Doc( @@ -1829,7 +1829,7 @@ def Form( # noqa: N802 Value must be a multiple of this. Only applicable to numbers. """ ), - ] = _Unset, + ] = _Unset, # ty: ignore[invalid-parameter-default] allow_inf_nan: Annotated[ bool | None, Doc( @@ -1837,7 +1837,7 @@ def Form( # noqa: N802 Allow `inf`, `-inf`, `nan`. Only applicable to numbers. """ ), - ] = _Unset, + ] = _Unset, # ty: ignore[invalid-parameter-default] max_digits: Annotated[ int | None, Doc( @@ -1845,7 +1845,7 @@ def Form( # noqa: N802 Maximum number of digits allowed for decimal values. """ ), - ] = _Unset, + ] = _Unset, # ty: ignore[invalid-parameter-default] decimal_places: Annotated[ int | None, Doc( @@ -1853,7 +1853,7 @@ def Form( # noqa: N802 Maximum number of decimal places allowed for decimal values. """ ), - ] = _Unset, + ] = _Unset, # ty: ignore[invalid-parameter-default] examples: Annotated[ list[Any] | None, Doc( @@ -1871,7 +1871,7 @@ def Form( # noqa: N802 "Deprecated in OpenAPI 3.1.0 that now uses JSON Schema 2020-12, " "although still supported. Use examples instead." ), - ] = _Unset, + ] = _Unset, # ty: ignore[invalid-parameter-default] openapi_examples: Annotated[ dict[str, Example] | None, Doc( @@ -1986,7 +1986,7 @@ def File( # noqa: N802 The parameter is available only for compatibility. """ ), - ] = _Unset, + ] = _Unset, # ty: ignore[invalid-parameter-default] media_type: Annotated[ str, Doc( @@ -2015,7 +2015,7 @@ def File( # noqa: N802 Priority of the alias. This affects whether an alias generator is used. """ ), - ] = _Unset, + ] = _Unset, # ty: ignore[invalid-parameter-default] validation_alias: Annotated[ str | AliasPath | AliasChoices | None, Doc( @@ -2136,7 +2136,7 @@ def File( # noqa: N802 If `True`, strict validation is applied to the field. """ ), - ] = _Unset, + ] = _Unset, # ty: ignore[invalid-parameter-default] multiple_of: Annotated[ float | None, Doc( @@ -2144,7 +2144,7 @@ def File( # noqa: N802 Value must be a multiple of this. Only applicable to numbers. """ ), - ] = _Unset, + ] = _Unset, # ty: ignore[invalid-parameter-default] allow_inf_nan: Annotated[ bool | None, Doc( @@ -2152,7 +2152,7 @@ def File( # noqa: N802 Allow `inf`, `-inf`, `nan`. Only applicable to numbers. """ ), - ] = _Unset, + ] = _Unset, # ty: ignore[invalid-parameter-default] max_digits: Annotated[ int | None, Doc( @@ -2160,7 +2160,7 @@ def File( # noqa: N802 Maximum number of digits allowed for decimal values. """ ), - ] = _Unset, + ] = _Unset, # ty: ignore[invalid-parameter-default] decimal_places: Annotated[ int | None, Doc( @@ -2168,7 +2168,7 @@ def File( # noqa: N802 Maximum number of decimal places allowed for decimal values. """ ), - ] = _Unset, + ] = _Unset, # ty: ignore[invalid-parameter-default] examples: Annotated[ list[Any] | None, Doc( @@ -2186,7 +2186,7 @@ def File( # noqa: N802 "Deprecated in OpenAPI 3.1.0 that now uses JSON Schema 2020-12, " "although still supported. Use examples instead." ), - ] = _Unset, + ] = _Unset, # ty: ignore[invalid-parameter-default] openapi_examples: Annotated[ dict[str, Example] | None, Doc( diff --git a/fastapi/params.py b/fastapi/params.py index ab5e7ee333..f695efc84a 100644 --- a/fastapi/params.py +++ b/fastapi/params.py @@ -31,10 +31,10 @@ class Param(FieldInfo): # type: ignore[misc] self, default: Any = Undefined, *, - default_factory: Callable[[], Any] | None = _Unset, + default_factory: Callable[[], Any] | None = _Unset, # ty: ignore[invalid-parameter-default] annotation: Any | None = None, alias: str | None = None, - alias_priority: int | None = _Unset, + alias_priority: int | None = _Unset, # ty: ignore[invalid-parameter-default] validation_alias: str | AliasPath | AliasChoices | None = None, serialization_alias: str | None = None, title: str | None = None, @@ -53,11 +53,11 @@ class Param(FieldInfo): # type: ignore[misc] ), ] = None, discriminator: str | None = None, - strict: bool | None = _Unset, - multiple_of: float | None = _Unset, - allow_inf_nan: bool | None = _Unset, - max_digits: int | None = _Unset, - decimal_places: int | None = _Unset, + strict: bool | None = _Unset, # ty: ignore[invalid-parameter-default] + multiple_of: float | None = _Unset, # ty: ignore[invalid-parameter-default] + allow_inf_nan: bool | None = _Unset, # ty: ignore[invalid-parameter-default] + max_digits: int | None = _Unset, # ty: ignore[invalid-parameter-default] + decimal_places: int | None = _Unset, # ty: ignore[invalid-parameter-default] examples: list[Any] | None = None, example: Annotated[ Any | None, @@ -65,7 +65,7 @@ class Param(FieldInfo): # type: ignore[misc] "Deprecated in OpenAPI 3.1.0 that now uses JSON Schema 2020-12, " "although still supported. Use examples instead." ), - ] = _Unset, + ] = _Unset, # ty: ignore[invalid-parameter-default] openapi_examples: dict[str, Example] | None = None, deprecated: deprecated | str | bool | None = None, include_in_schema: bool = True, @@ -142,10 +142,10 @@ class Path(Param): # type: ignore[misc] # ty: ignore[unused-ignore-comment] self, default: Any = ..., *, - default_factory: Callable[[], Any] | None = _Unset, + default_factory: Callable[[], Any] | None = _Unset, # ty: ignore[invalid-parameter-default] annotation: Any | None = None, alias: str | None = None, - alias_priority: int | None = _Unset, + alias_priority: int | None = _Unset, # ty: ignore[invalid-parameter-default] validation_alias: str | AliasPath | AliasChoices | None = None, serialization_alias: str | None = None, title: str | None = None, @@ -164,11 +164,11 @@ class Path(Param): # type: ignore[misc] # ty: ignore[unused-ignore-comment] ), ] = None, discriminator: str | None = None, - strict: bool | None = _Unset, - multiple_of: float | None = _Unset, - allow_inf_nan: bool | None = _Unset, - max_digits: int | None = _Unset, - decimal_places: int | None = _Unset, + strict: bool | None = _Unset, # ty: ignore[invalid-parameter-default] + multiple_of: float | None = _Unset, # ty: ignore[invalid-parameter-default] + allow_inf_nan: bool | None = _Unset, # ty: ignore[invalid-parameter-default] + max_digits: int | None = _Unset, # ty: ignore[invalid-parameter-default] + decimal_places: int | None = _Unset, # ty: ignore[invalid-parameter-default] examples: list[Any] | None = None, example: Annotated[ Any | None, @@ -176,7 +176,7 @@ class Path(Param): # type: ignore[misc] # ty: ignore[unused-ignore-comment] "Deprecated in OpenAPI 3.1.0 that now uses JSON Schema 2020-12, " "although still supported. Use examples instead." ), - ] = _Unset, + ] = _Unset, # ty: ignore[invalid-parameter-default] openapi_examples: dict[str, Example] | None = None, deprecated: deprecated | str | bool | None = None, include_in_schema: bool = True, @@ -226,10 +226,10 @@ class Query(Param): # type: ignore[misc] # ty: ignore[unused-ignore-comment] self, default: Any = Undefined, *, - default_factory: Callable[[], Any] | None = _Unset, + default_factory: Callable[[], Any] | None = _Unset, # ty: ignore[invalid-parameter-default] annotation: Any | None = None, alias: str | None = None, - alias_priority: int | None = _Unset, + alias_priority: int | None = _Unset, # ty: ignore[invalid-parameter-default] validation_alias: str | AliasPath | AliasChoices | None = None, serialization_alias: str | None = None, title: str | None = None, @@ -248,11 +248,11 @@ class Query(Param): # type: ignore[misc] # ty: ignore[unused-ignore-comment] ), ] = None, discriminator: str | None = None, - strict: bool | None = _Unset, - multiple_of: float | None = _Unset, - allow_inf_nan: bool | None = _Unset, - max_digits: int | None = _Unset, - decimal_places: int | None = _Unset, + strict: bool | None = _Unset, # ty: ignore[invalid-parameter-default] + multiple_of: float | None = _Unset, # ty: ignore[invalid-parameter-default] + allow_inf_nan: bool | None = _Unset, # ty: ignore[invalid-parameter-default] + max_digits: int | None = _Unset, # ty: ignore[invalid-parameter-default] + decimal_places: int | None = _Unset, # ty: ignore[invalid-parameter-default] examples: list[Any] | None = None, example: Annotated[ Any | None, @@ -260,7 +260,7 @@ class Query(Param): # type: ignore[misc] # ty: ignore[unused-ignore-comment] "Deprecated in OpenAPI 3.1.0 that now uses JSON Schema 2020-12, " "although still supported. Use examples instead." ), - ] = _Unset, + ] = _Unset, # ty: ignore[invalid-parameter-default] openapi_examples: dict[str, Example] | None = None, deprecated: deprecated | str | bool | None = None, include_in_schema: bool = True, @@ -308,10 +308,10 @@ class Header(Param): # type: ignore[misc] # ty: ignore[unused-ignore-comment] self, default: Any = Undefined, *, - default_factory: Callable[[], Any] | None = _Unset, + default_factory: Callable[[], Any] | None = _Unset, # ty: ignore[invalid-parameter-default] annotation: Any | None = None, alias: str | None = None, - alias_priority: int | None = _Unset, + alias_priority: int | None = _Unset, # ty: ignore[invalid-parameter-default] validation_alias: str | AliasPath | AliasChoices | None = None, serialization_alias: str | None = None, convert_underscores: bool = True, @@ -331,11 +331,11 @@ class Header(Param): # type: ignore[misc] # ty: ignore[unused-ignore-comment] ), ] = None, discriminator: str | None = None, - strict: bool | None = _Unset, - multiple_of: float | None = _Unset, - allow_inf_nan: bool | None = _Unset, - max_digits: int | None = _Unset, - decimal_places: int | None = _Unset, + strict: bool | None = _Unset, # ty: ignore[invalid-parameter-default] + multiple_of: float | None = _Unset, # ty: ignore[invalid-parameter-default] + allow_inf_nan: bool | None = _Unset, # ty: ignore[invalid-parameter-default] + max_digits: int | None = _Unset, # ty: ignore[invalid-parameter-default] + decimal_places: int | None = _Unset, # ty: ignore[invalid-parameter-default] examples: list[Any] | None = None, example: Annotated[ Any | None, @@ -343,7 +343,7 @@ class Header(Param): # type: ignore[misc] # ty: ignore[unused-ignore-comment] "Deprecated in OpenAPI 3.1.0 that now uses JSON Schema 2020-12, " "although still supported. Use examples instead." ), - ] = _Unset, + ] = _Unset, # ty: ignore[invalid-parameter-default] openapi_examples: dict[str, Example] | None = None, deprecated: deprecated | str | bool | None = None, include_in_schema: bool = True, @@ -392,10 +392,10 @@ class Cookie(Param): # type: ignore[misc] # ty: ignore[unused-ignore-comment] self, default: Any = Undefined, *, - default_factory: Callable[[], Any] | None = _Unset, + default_factory: Callable[[], Any] | None = _Unset, # ty: ignore[invalid-parameter-default] annotation: Any | None = None, alias: str | None = None, - alias_priority: int | None = _Unset, + alias_priority: int | None = _Unset, # ty: ignore[invalid-parameter-default] validation_alias: str | AliasPath | AliasChoices | None = None, serialization_alias: str | None = None, title: str | None = None, @@ -414,11 +414,11 @@ class Cookie(Param): # type: ignore[misc] # ty: ignore[unused-ignore-comment] ), ] = None, discriminator: str | None = None, - strict: bool | None = _Unset, - multiple_of: float | None = _Unset, - allow_inf_nan: bool | None = _Unset, - max_digits: int | None = _Unset, - decimal_places: int | None = _Unset, + strict: bool | None = _Unset, # ty: ignore[invalid-parameter-default] + multiple_of: float | None = _Unset, # ty: ignore[invalid-parameter-default] + allow_inf_nan: bool | None = _Unset, # ty: ignore[invalid-parameter-default] + max_digits: int | None = _Unset, # ty: ignore[invalid-parameter-default] + decimal_places: int | None = _Unset, # ty: ignore[invalid-parameter-default] examples: list[Any] | None = None, example: Annotated[ Any | None, @@ -426,7 +426,7 @@ class Cookie(Param): # type: ignore[misc] # ty: ignore[unused-ignore-comment] "Deprecated in OpenAPI 3.1.0 that now uses JSON Schema 2020-12, " "although still supported. Use examples instead." ), - ] = _Unset, + ] = _Unset, # ty: ignore[invalid-parameter-default] openapi_examples: dict[str, Example] | None = None, deprecated: deprecated | str | bool | None = None, include_in_schema: bool = True, @@ -472,12 +472,12 @@ class Body(FieldInfo): # type: ignore[misc] self, default: Any = Undefined, *, - default_factory: Callable[[], Any] | None = _Unset, + default_factory: Callable[[], Any] | None = _Unset, # ty: ignore[invalid-parameter-default] annotation: Any | None = None, embed: bool | None = None, media_type: str = "application/json", alias: str | None = None, - alias_priority: int | None = _Unset, + alias_priority: int | None = _Unset, # ty: ignore[invalid-parameter-default] validation_alias: str | AliasPath | AliasChoices | None = None, serialization_alias: str | None = None, title: str | None = None, @@ -496,11 +496,11 @@ class Body(FieldInfo): # type: ignore[misc] ), ] = None, discriminator: str | None = None, - strict: bool | None = _Unset, - multiple_of: float | None = _Unset, - allow_inf_nan: bool | None = _Unset, - max_digits: int | None = _Unset, - decimal_places: int | None = _Unset, + strict: bool | None = _Unset, # ty: ignore[invalid-parameter-default] + multiple_of: float | None = _Unset, # ty: ignore[invalid-parameter-default] + allow_inf_nan: bool | None = _Unset, # ty: ignore[invalid-parameter-default] + max_digits: int | None = _Unset, # ty: ignore[invalid-parameter-default] + decimal_places: int | None = _Unset, # ty: ignore[invalid-parameter-default] examples: list[Any] | None = None, example: Annotated[ Any | None, @@ -508,7 +508,7 @@ class Body(FieldInfo): # type: ignore[misc] "Deprecated in OpenAPI 3.1.0 that now uses JSON Schema 2020-12, " "although still supported. Use examples instead." ), - ] = _Unset, + ] = _Unset, # ty: ignore[invalid-parameter-default] openapi_examples: dict[str, Example] | None = None, deprecated: deprecated | str | bool | None = None, include_in_schema: bool = True, @@ -584,11 +584,11 @@ class Form(Body): # type: ignore[misc] # ty: ignore[unused-ignore-comment] self, default: Any = Undefined, *, - default_factory: Callable[[], Any] | None = _Unset, + default_factory: Callable[[], Any] | None = _Unset, # ty: ignore[invalid-parameter-default] annotation: Any | None = None, media_type: str = "application/x-www-form-urlencoded", alias: str | None = None, - alias_priority: int | None = _Unset, + alias_priority: int | None = _Unset, # ty: ignore[invalid-parameter-default] validation_alias: str | AliasPath | AliasChoices | None = None, serialization_alias: str | None = None, title: str | None = None, @@ -607,11 +607,11 @@ class Form(Body): # type: ignore[misc] # ty: ignore[unused-ignore-comment] ), ] = None, discriminator: str | None = None, - strict: bool | None = _Unset, - multiple_of: float | None = _Unset, - allow_inf_nan: bool | None = _Unset, - max_digits: int | None = _Unset, - decimal_places: int | None = _Unset, + strict: bool | None = _Unset, # ty: ignore[invalid-parameter-default] + multiple_of: float | None = _Unset, # ty: ignore[invalid-parameter-default] + allow_inf_nan: bool | None = _Unset, # ty: ignore[invalid-parameter-default] + max_digits: int | None = _Unset, # ty: ignore[invalid-parameter-default] + decimal_places: int | None = _Unset, # ty: ignore[invalid-parameter-default] examples: list[Any] | None = None, example: Annotated[ Any | None, @@ -619,7 +619,7 @@ class Form(Body): # type: ignore[misc] # ty: ignore[unused-ignore-comment] "Deprecated in OpenAPI 3.1.0 that now uses JSON Schema 2020-12, " "although still supported. Use examples instead." ), - ] = _Unset, + ] = _Unset, # ty: ignore[invalid-parameter-default] openapi_examples: dict[str, Example] | None = None, deprecated: deprecated | str | bool | None = None, include_in_schema: bool = True, @@ -666,11 +666,11 @@ class File(Form): # type: ignore[misc] # ty: ignore[unused-ignore-comment] self, default: Any = Undefined, *, - default_factory: Callable[[], Any] | None = _Unset, + default_factory: Callable[[], Any] | None = _Unset, # ty: ignore[invalid-parameter-default] annotation: Any | None = None, media_type: str = "multipart/form-data", alias: str | None = None, - alias_priority: int | None = _Unset, + alias_priority: int | None = _Unset, # ty: ignore[invalid-parameter-default] validation_alias: str | AliasPath | AliasChoices | None = None, serialization_alias: str | None = None, title: str | None = None, @@ -689,11 +689,11 @@ class File(Form): # type: ignore[misc] # ty: ignore[unused-ignore-comment] ), ] = None, discriminator: str | None = None, - strict: bool | None = _Unset, - multiple_of: float | None = _Unset, - allow_inf_nan: bool | None = _Unset, - max_digits: int | None = _Unset, - decimal_places: int | None = _Unset, + strict: bool | None = _Unset, # ty: ignore[invalid-parameter-default] + multiple_of: float | None = _Unset, # ty: ignore[invalid-parameter-default] + allow_inf_nan: bool | None = _Unset, # ty: ignore[invalid-parameter-default] + max_digits: int | None = _Unset, # ty: ignore[invalid-parameter-default] + decimal_places: int | None = _Unset, # ty: ignore[invalid-parameter-default] examples: list[Any] | None = None, example: Annotated[ Any | None, @@ -701,7 +701,7 @@ class File(Form): # type: ignore[misc] # ty: ignore[unused-ignore-comment] "Deprecated in OpenAPI 3.1.0 that now uses JSON Schema 2020-12, " "although still supported. Use examples instead." ), - ] = _Unset, + ] = _Unset, # ty: ignore[invalid-parameter-default] openapi_examples: dict[str, Example] | None = None, deprecated: deprecated | str | bool | None = None, include_in_schema: bool = True,