Skip to content

Commit 08ce9b7

Browse files
committed
api
1 parent f6a4b94 commit 08ce9b7

File tree

1 file changed

+11
-8
lines changed

1 file changed

+11
-8
lines changed

api/specs/web-server/_auth.py

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# pylint: disable=too-many-arguments
55

66

7-
from typing import Any
7+
from typing import Annotated, Any
88

99
from fastapi import APIRouter, status
1010
from models_library.api_schemas_webserver.auth import (
@@ -211,13 +211,16 @@ async def change_email(_body: ChangeEmailBody):
211211

212212

213213
class PasswordCheckSchema(BaseModel):
214-
strength: confloat(ge=0.0, le=1.0) = Field( # type: ignore
215-
...,
216-
description="The strength of the password ranges from 0 (extremely weak) and 1 (extremely strong)",
217-
)
218-
rating: str | None = Field(
219-
None, description="Human readable rating from infinitely weak to very strong"
220-
)
214+
strength: Annotated[
215+
confloat(ge=0.0, le=1.0),
216+
Field(
217+
description="The strength of the password ranges from 0 (extremely weak) and 1 (extremely strong)",
218+
),
219+
]
220+
rating: Annotated[
221+
str | None,
222+
Field(description="Human readable rating from infinitely weak to very strong"),
223+
] = None
221224
improvements: Any | None = None
222225

223226

0 commit comments

Comments
 (0)