From bb7f34053730da924486f97baa0d34fee9b1918b Mon Sep 17 00:00:00 2001 From: Selwin Ong Date: Mon, 28 Oct 2024 22:57:02 +0700 Subject: [PATCH] Fix typing --- rq/queue.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rq/queue.py b/rq/queue.py index e2ac9009..f88d5ba4 100644 --- a/rq/queue.py +++ b/rq/queue.py @@ -348,7 +348,7 @@ class Queue: Returns: _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): try: @@ -461,7 +461,7 @@ class Queue: Returns: _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: return pipeline.lrem(self.key, 1, job_id)