Updated most python dependencies

Primarily FastAPI and Pydantic to v2. Also ruff to latest.

Updated some code to support Pydantic v2
This commit is contained in:
Donkie
2024-05-23 19:42:27 +02:00
parent 306dbe40af
commit 535fa40ad2
29 changed files with 839 additions and 531 deletions

View File

@@ -45,13 +45,13 @@ class ExtraFieldParameters(BaseModel):
choices: Optional[list[str]] = Field(
None,
description="Choices for the field, only for field type choice",
min_items=1,
min_length=1,
)
multi_choice: Optional[bool] = Field(None, description="Whether multiple choices can be selected")
class ExtraField(ExtraFieldParameters):
key: str = Field(description="Unique key", regex="^[a-z0-9_]+$", min_length=1, max_length=64)
key: str = Field(description="Unique key", pattern="^[a-z0-9_]+$", min_length=1, max_length=64)
entity_type: EntityType = Field(description="Entity type this field is for")