Skip to content

Commit

Permalink
replace batched from itertools
Browse files Browse the repository at this point in the history
  • Loading branch information
RB387 committed Dec 17, 2024
1 parent 6a61863 commit 8e76b58
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions arq/jobs.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
from dataclasses import dataclass
from datetime import datetime
from enum import Enum
from itertools import batched
from typing import Any, Callable, Dict, Optional, Tuple

from redis.asyncio import Redis
Expand Down Expand Up @@ -74,7 +73,7 @@ class JobResult(JobDef):


def _list_to_dict(input_list: list[Any]) -> dict[Any, Any]:
return {key: value for key, value in batched(input_list, 2)}
return dict(zip(input_list[::2], input_list[1::2], strict=True))


class Job:
Expand Down

0 comments on commit 8e76b58

Please sign in to comment.