Fix typing

This commit is contained in:
Selwin Ong 2024-10-28 22:57:02 +07:00
parent 03a08e1c79
commit bb7f340537
1 changed files with 2 additions and 2 deletions

View File

@ -348,7 +348,7 @@ class Queue:
Returns: Returns:
_type_: _description_ _type_: _description_
""" """
job_id = job_or_id.id if isinstance(job_or_id, self.job_class) else job_or_id job_id = cast(str, job_or_id.id if isinstance(job_or_id, self.job_class) else job_or_id)
if self.get_redis_server_version() >= (6, 0, 6): if self.get_redis_server_version() >= (6, 0, 6):
try: try:
@ -461,7 +461,7 @@ class Queue:
Returns: Returns:
_type_: _description_ _type_: _description_
""" """
job_id: str = job_or_id.id if isinstance(job_or_id, self.job_class) else job_or_id job_id = cast(str, job_or_id.id if isinstance(job_or_id, self.job_class) else job_or_id)
if pipeline is not None: if pipeline is not None:
return pipeline.lrem(self.key, 1, job_id) return pipeline.lrem(self.key, 1, job_id)