From a3945e1e44933ab8bca49559f3fd7eaced896c44 Mon Sep 17 00:00:00 2001 From: correctmost <134317971+correctmost@users.noreply.github.com> Date: Fri, 30 May 2025 23:43:58 -0400 Subject: [PATCH] Remove unused _DeferredTranslation methods and references --- archinstall/lib/menu/list_manager.py | 2 +- archinstall/lib/translationhandler.py | 16 ---------------- 2 files changed, 1 insertion(+), 17 deletions(-) diff --git a/archinstall/lib/menu/list_manager.py b/archinstall/lib/menu/list_manager.py index 8191bd185c..7c7b334270 100644 --- a/archinstall/lib/menu/list_manager.py +++ b/archinstall/lib/menu/list_manager.py @@ -19,7 +19,7 @@ def __init__( ): """ :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 diff --git a/archinstall/lib/translationhandler.py b/archinstall/lib/translationhandler.py index 0cca8dcd4b..5a13e04458 100644 --- a/archinstall/lib/translationhandler.py +++ b/archinstall/lib/translationhandler.py @@ -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 @@ def __str__(self) -> str: # 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))