regex -> pattern
All checks were successful
Build and Publish college-bot-v2 / build_and_publish (push) Successful in 14s
All checks were successful
Build and Publish college-bot-v2 / build_and_publish (push) Successful in 14s
This commit is contained in:
parent
33d47d2dc8
commit
2d501cb32d
1 changed files with 1 additions and 1 deletions
|
@ -21,7 +21,7 @@ JSON: typing.Union[
|
|||
class TruthPayload(BaseModel):
|
||||
id: str
|
||||
content: str
|
||||
author: typing.Literal["trump", "tate"] = Field(regex=r"^(trump|tate)$")
|
||||
author: typing.Literal["trump", "tate"] = Field(pattern=r"^(trump|tate)$")
|
||||
timestamp: float = Field(default_factory=time.time, ge=0)
|
||||
extra: typing.Optional[JSON] = None
|
||||
|
||||
|
|
Loading…
Reference in a new issue