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,6 +14,5 @@ httpx-socks[asyncio]==0.7.7
setproctitle==1.3.3
redis==5.0.2
markdown-it-py==3.0.0
typing_extensions==4.9.0
fasttext-predict==0.9.2.2
pytomlpp==1.0.13

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`."""

View file

@ -8,8 +8,7 @@ import time
import threading
import os
import signal
from typing import Dict, Union, List, Any, Tuple, Optional
from typing_extensions import TypedDict, Literal
from typing import Any, Dict, List, Literal, Optional, Tuple, TypedDict, Union
import redis.exceptions