Skip to content

Commit

Permalink
Fixed trash things
Browse files Browse the repository at this point in the history
  • Loading branch information
xfenix committed Jan 8, 2024
1 parent 9e92b25 commit 42c5dbf
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion scripts/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def _update_readme() -> None:
if field_properties.metadata:
validators_buf: list[str] = []
for one_obj in field_properties.metadata:
restriction_stringified: typing.Final = str(one_obj)
restriction_stringified: str = str(one_obj)
if any(("BeforeValidator" in restriction_stringified, "StringConstraints" in restriction_stringified)):
continue
validators_buf.append(f"`{restriction_stringified}`")
Expand Down
8 changes: 4 additions & 4 deletions whole_app/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ class OneCorrection(pydantic.BaseModel):


class SpellCheckRequest(pydantic.BaseModel):
text: str = pydantic.Field(..., example="Привед как дила")
text: str = pydantic.Field(..., examples=["Привед как дила"])
language: AvailableLanguagesType
user_name: str | None = pydantic.Field(
None,
example="username",
examples=["username"],
pattern=SETTINGS.username_regex,
min_length=SETTINGS.username_min_length,
max_length=SETTINGS.username_max_length,
Expand All @@ -34,15 +34,15 @@ class SpellCheckResponse(pydantic.BaseModel):

class UserDictionaryRequest(pydantic.BaseModel):
user_name: str = pydantic.Field(
example="username",
examples=["username"],
pattern=SETTINGS.username_regex,
min_length=SETTINGS.username_min_length,
max_length=SETTINGS.username_max_length,
)


class UserDictionaryRequestWithWord(UserDictionaryRequest):
exception_word: str = pydantic.Field(..., example="привед")
exception_word: str = pydantic.Field(..., examples=["привед"])


class HealthCheckResponse(pydantic.BaseModel):
Expand Down

0 comments on commit 42c5dbf

Please sign in to comment.