From 6d5ca97ad0a93c75bd196e4c69f092c29e6f18a5 Mon Sep 17 00:00:00 2001 From: Aditya Yadav Date: Wed, 21 Dec 2022 13:00:47 +0530 Subject: [PATCH] Revert "Revert "Revert "Revert "Drop Undocumented `Job.__lt__` (#3432)"""" This reverts commit 4df36490f7334d8cc4a5a862708ee6249d67ba23. --- telegram/ext/_jobqueue.py | 3 --- tests/test_jobqueue.py | 4 ---- 2 files changed, 7 deletions(-) diff --git a/telegram/ext/_jobqueue.py b/telegram/ext/_jobqueue.py index e646b3429e8..15ff4450b8b 100644 --- a/telegram/ext/_jobqueue.py +++ b/telegram/ext/_jobqueue.py @@ -804,9 +804,6 @@ def __getattr__(self, item: str) -> object: f"Neither 'telegram.ext.Job' nor 'apscheduler.job.Job' has attribute '{item}'" ) from exc - def __lt__(self, other: object) -> bool: - return False - def __eq__(self, other: object) -> bool: if isinstance(other, self.__class__): return self.id == other.id diff --git a/tests/test_jobqueue.py b/tests/test_jobqueue.py index 5488eb476b8..d3170696fed 100644 --- a/tests/test_jobqueue.py +++ b/tests/test_jobqueue.py @@ -491,10 +491,6 @@ async def test_equality(self, job_queue): assert hash(job) != hash(job_2) assert hash(job) == hash(job_3) - assert not job < job - assert not job < job_2 - assert not job < job_3 - async def test_process_error_context(self, job_queue, app): app.add_error_handler(self.error_handler_context)