mirror of
https://github.com/searxng/searxng.git
synced 2024-06-10 17:29:29 +00:00
Drop typing-extensions dependency
This commit is contained in:
parent
858b2071df
commit
df531e4197
|
@ -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
|
||||
|
|
|
@ -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`."""
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue