Skip to content
This repository was archived by the owner on Oct 29, 2024. It is now read-only.

Commit d6e7d1c

Browse files
author
Jamie Hewland
committed
Import itertools functions directly
1 parent 3251901 commit d6e7d1c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

influxdb/client.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66
from __future__ import print_function
77
from __future__ import unicode_literals
88

9-
import itertools
109
import time
1110
import random
11+
from itertools import chain, islice
1212

1313
import json
1414
import socket
@@ -553,8 +553,8 @@ def _batches(iterable, size):
553553
except StopIteration:
554554
return # ...so that we can stop if there isn't one
555555
# Otherwise, lazily slice the rest of the batch
556-
rest = itertools.islice(iterator, size - 1)
557-
yield itertools.chain(head, rest)
556+
rest = islice(iterator, size - 1)
557+
yield chain(head, rest)
558558

559559
def _write_points(self,
560560
points,

0 commit comments

Comments
 (0)