Skip to content

Commit 1aa23db

Browse files
Potential fix for pull request finding
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
1 parent e4c1911 commit 1aa23db

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

service/models.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from typing import Any
1+
from typing import Any, Literal
22

33
from pydantic import BaseModel, Field
44

@@ -43,7 +43,10 @@ class CharacterSearchBody(BaseModel):
4343
h: list[str] | str | None = Field(None, description="Headers to display. Either a string or Array of strings")
4444
help: bool | None = Field(None, description=f"List available options. {_TF_TEXT}")
4545
limit: int | None = Field(None, description="Limit result set. '0' for no limit")
46-
nulls: str | None = Field(None, description=f"Sort null values first or last in order. {_TF_TEXT}")
46+
nulls: Literal["first", "last"] | None = Field(
47+
None,
48+
description='Sort null values either "first" or "last" in the order.',
49+
)
4750
pretty: bool | str | None = Field(None, description=f"Pretty print the result set. {_TF_TEXT}")
4851
prune: bool | str | None = Field(None, description=f"Remove keys with null values. {_TF_TEXT}")
4952
random: bool | str | None = Field(None, description=f"Returns array of random superheros based on limit. {_TF_TEXT}")

0 commit comments

Comments
 (0)