From 9ee1c0bdcb95dbc92fd2f1a396087e1c4356c3fa Mon Sep 17 00:00:00 2001 From: Sourcery AI <> Date: Sun, 19 Sep 2021 15:33:55 +0000 Subject: [PATCH] 'Refactored by Sourcery' --- tests/tests_itertools.py | 3 +-- tqdm/std.py | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/tests/tests_itertools.py b/tests/tests_itertools.py index bfb6eb2c..96de99ff 100644 --- a/tests/tests_itertools.py +++ b/tests/tests_itertools.py @@ -13,8 +13,7 @@ class NoLenIter(object): self._it = iterable def __iter__(self): - for i in self._it: - yield i + yield from self._it def test_product(): diff --git a/tqdm/std.py b/tqdm/std.py index e81c8368..665398f4 100644 --- a/tqdm/std.py +++ b/tqdm/std.py @@ -1165,8 +1165,7 @@ class tqdm(Comparable): # If the bar is disabled, then just walk the iterable # (note: keep this check outside the loop for performance) if self.disable: - for obj in iterable: - yield obj + yield from iterable return mininterval = self.mininterval