Skip to content

Commit db67d5c

Browse files
[pylint 'use-yield-from'] Fix all occurences in existing code
1 parent 383659d commit db67d5c

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/_pytest/_py/path.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -161,15 +161,13 @@ def gen(self, path):
161161
)
162162
if not self.breadthfirst:
163163
for subdir in dirs:
164-
for p in self.gen(subdir):
165-
yield p
164+
yield from self.gen(subdir)
166165
for p in self.optsort(entries):
167166
if self.fil is None or self.fil(p):
168167
yield p
169168
if self.breadthfirst:
170169
for subdir in dirs:
171-
for p in self.gen(subdir):
172-
yield p
170+
yield from self.gen(subdir)
173171

174172

175173
class FNMatcher:

0 commit comments

Comments
 (0)