Skip to content

Commit

Permalink
chore: Remove more-itertools dependency
Browse files Browse the repository at this point in the history
Python >= 3.12 includes this iterator in the stdlib. Let's wait until
Python 3.13 is released before merging.
  • Loading branch information
rumpelsepp committed Sep 2, 2024
1 parent d2070e9 commit 7797052
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 16 deletions.
13 changes: 1 addition & 12 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ platformdirs = ">=2.6,<5.0"
exitcode = "^0.1.0"
psutil = ">=5.9.4,<7.0.0"
httpx = ">=0.26,<0.28"
more-itertools = "^10.3.0"

[tool.poetry.group.dev.dependencies]
Sphinx = ">=5.2,<8.0"
Expand Down
6 changes: 3 additions & 3 deletions src/gallia/transports/flexray_vector.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
import asyncio
import sys
from enum import IntEnum, unique
from itertools import batched
from typing import ClassVar, Self, TypeAlias

from more_itertools import chunked
from pydantic import BaseModel, ConfigDict, field_validator

from gallia.log import get_logger
Expand Down Expand Up @@ -371,10 +371,10 @@ async def write_unsafe(
# Maybe a further flow control comes after block size number of frames.

counter = 1
for chunk in chunked(data[6:], 7):
for batch in batched(data[6:], 7):
cf_frame = FlexRayTPConsecutiveFrame(
counter=counter,
data=bytes(chunk),
data=bytes(batch),
)

await self.write_tp_frame(cf_frame)
Expand Down

0 comments on commit 7797052

Please sign in to comment.