Skip to content

Commit c94b8c2

Browse files
committed
🔨 for .... in ... yield becomes yield from. related to #303
1 parent 81bb1b4 commit c94b8c2

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

moban/core/mobanfile/templates.py

+3-5
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,9 @@ def handle_template(template_file, output, template_dirs):
1616
source_dir = template_file[:-3]
1717
_, fs = multi_fs.which(source_dir)
1818
if fs:
19-
for a_triple in _listing_directory_files_recusively(
19+
yield from _listing_directory_files_recusively(
2020
fs, source_dir, output
21-
):
22-
yield a_triple
21+
)
2322
else:
2423
if STORE.look_up_by_output.get(template_file) is None:
2524
reporter.report_error_message(
@@ -35,8 +34,7 @@ def handle_template(template_file, output, template_dirs):
3534
else:
3635
yield _create_a_single_target(template_file, output)
3736
elif fs.isdir(template_file):
38-
for a_triple in _list_dir_files(fs, template_file, output):
39-
yield a_triple
37+
yield from _list_dir_files(fs, template_file, output)
4038
else:
4139
yield _create_a_single_target(template_file, output)
4240

0 commit comments

Comments
 (0)