mirror of
https://github.com/searxng/searxng
synced 2024-01-01 19:24:07 +01:00
Drop typing-extensions dependency
This commit is contained in:
parent
858b2071df
commit
df531e4197
3 changed files with 5 additions and 5 deletions
|
|
@ -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`."""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue