Skip to content

Commit eb1658e

Browse files
Replace zip() with itertools.pairwise()
1 parent a964b20 commit eb1658e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pylint/checkers/base/basic_checker.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -884,7 +884,7 @@ def visit_with(self, node: nodes.With) -> None:
884884
# to one AST "With" node with multiple items
885885
pairs = node.items
886886
if pairs:
887-
for prev_pair, pair in zip(pairs, pairs[1:]):
887+
for prev_pair, pair in itertools.pairwise(pairs):
888888
if isinstance(prev_pair[1], nodes.AssignName) and (
889889
pair[1] is None and not isinstance(pair[0], nodes.Call)
890890
):

0 commit comments

Comments
 (0)