Drop typing-extensions dependency

This commit is contained in:
Alexandre Flament 2024-03-01 15:36:36 +01:00
parent 858b2071df
commit df531e4197
3 changed files with 5 additions and 5 deletions

View file

@ -14,8 +14,7 @@ from __future__ import annotations
import json
import dataclasses
import types
from typing import Dict, Iterable, Union, Callable, Optional, TYPE_CHECKING
from typing_extensions import Literal, Self
from typing import Dict, Literal, Iterable, Union, Callable, TypeVar, Optional, TYPE_CHECKING
from searx import locales
from searx.data import data_dir, ENGINE_TRAITS
@ -24,6 +23,9 @@ if TYPE_CHECKING:
from . import Engine
Self = TypeVar("Self", bound="EngineTraits") # Python 3.11, to replace by typing.Self
class EngineTraitsEncoder(json.JSONEncoder):
"""Encodes :class:`EngineTraits` to a serializable object, see
:class:`json.JSONEncoder`."""