Drop Undocumented Job.__lt__ (#3432)

This commit is contained in:
Bibo-Joshi 2022-12-19 18:32:53 +01:00 committed by GitHub
parent 28afeccf70
commit 5b629ede56
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 0 additions and 7 deletions

View file

@ -804,9 +804,6 @@ class Job:
f"Neither 'telegram.ext.Job' nor 'apscheduler.job.Job' has attribute '{item}'" f"Neither 'telegram.ext.Job' nor 'apscheduler.job.Job' has attribute '{item}'"
) from exc ) from exc
def __lt__(self, other: object) -> bool:
return False
def __eq__(self, other: object) -> bool: def __eq__(self, other: object) -> bool:
if isinstance(other, self.__class__): if isinstance(other, self.__class__):
return self.id == other.id return self.id == other.id

View file

@ -491,10 +491,6 @@ class TestJobQueue:
assert hash(job) != hash(job_2) assert hash(job) != hash(job_2)
assert hash(job) == hash(job_3) 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): async def test_process_error_context(self, job_queue, app):
app.add_error_handler(self.error_handler_context) app.add_error_handler(self.error_handler_context)