Skip to content

Commit ce3dcb6

Browse files
committed
improve
1 parent 53d7f41 commit ce3dcb6

File tree

1 file changed

+4
-3
lines changed
  • python-objectstore-client/src/objectstore_client

1 file changed

+4
-3
lines changed

python-objectstore-client/src/objectstore_client/metadata.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@
77
from datetime import timedelta
88
from typing import Iterable, Iterator, Literal, TypeVar, cast
99

10-
T = TypeVar("T")
11-
1210
Compression = Literal["zstd"]
1311

1412
HEADER_EXPIRATION = "x-sn-expiration"
@@ -76,7 +74,7 @@ def format_timedelta(delta: timedelta) -> str:
7674
return output
7775

7876

79-
TIME_SPLIT = re.compile(r"[^\W\d_]+|\d+")
77+
T = TypeVar("T")
8078

8179

8280
def itertools_batched(iterable: Iterable[T], n: int, strict: bool = False) -> Iterator[tuple[T, ...]]:
@@ -98,6 +96,9 @@ def itertools_batched(iterable: Iterable[T], n: int, strict: bool = False) -> It
9896
yield batch
9997

10098

99+
TIME_SPLIT = re.compile(r"[^\W\d_]+|\d+")
100+
101+
101102
def parse_timedelta(delta: str) -> timedelta:
102103
words = TIME_SPLIT.findall(delta)
103104
seconds = 0

0 commit comments

Comments
 (0)