Remove unused _DeferredTranslation methods and references (#3557)
This commit is contained in:
parent
e245a11463
commit
a1b83ad29f
|
|
@ -19,7 +19,7 @@ class ListManager[ValueT]:
|
|||
):
|
||||
"""
|
||||
:param prompt: Text which will appear at the header
|
||||
type param: string | DeferredTranslation
|
||||
type param: string
|
||||
|
||||
:param entries: list/dict of option to be shown / manipulated
|
||||
type param: list
|
||||
|
|
|
|||
|
|
@ -163,9 +163,6 @@ class _DeferredTranslation:
|
|||
def __init__(self, message: str):
|
||||
self.message = message
|
||||
|
||||
def __len__(self) -> int:
|
||||
return len(self.message)
|
||||
|
||||
@override
|
||||
def __str__(self) -> str:
|
||||
if builtins._ is _DeferredTranslation: # type: ignore[attr-defined]
|
||||
|
|
@ -175,19 +172,6 @@ class _DeferredTranslation:
|
|||
# Language.activate() is called
|
||||
return builtins._(self.message) # type: ignore[attr-defined]
|
||||
|
||||
def __lt__(self, other) -> bool:
|
||||
return self.message < other
|
||||
|
||||
def __gt__(self, other) -> bool:
|
||||
return self.message > other
|
||||
|
||||
def __add__(self, other) -> _DeferredTranslation:
|
||||
if isinstance(other, str):
|
||||
other = _DeferredTranslation(other)
|
||||
|
||||
concat = self.message + other.message
|
||||
return _DeferredTranslation(concat)
|
||||
|
||||
|
||||
def tr(message: str) -> str:
|
||||
return str(_DeferredTranslation(message))
|
||||
|
|
|
|||
Loading…
Reference in New Issue