mirror of
https://github.com/searxng/searxng.git
synced 2025-12-24 04:30:02 +00:00
[refactor] replace pydantic by msgspec
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
This commit is contained in:
committed by
Markus Heiser
parent
e392892578
commit
3e5621e1af
@@ -30,7 +30,7 @@ import tempfile
|
||||
import time
|
||||
import typer
|
||||
|
||||
from pydantic import BaseModel
|
||||
import msgspec
|
||||
|
||||
from searx import sqlitedb
|
||||
from searx import logger
|
||||
@@ -90,7 +90,7 @@ def init(cfg: "FaviconCacheConfig"):
|
||||
raise NotImplementedError(f"favicons db_type '{cfg.db_type}' is unknown")
|
||||
|
||||
|
||||
class FaviconCacheConfig(BaseModel):
|
||||
class FaviconCacheConfig(msgspec.Struct): # pylint: disable=too-few-public-methods
|
||||
"""Configuration of the favicon cache."""
|
||||
|
||||
db_type: Literal["sqlite", "mem"] = "sqlite"
|
||||
|
||||
Reference in New Issue
Block a user