From 65e2225a5a1f2ddf292d639380759a44eec89181 Mon Sep 17 00:00:00 2001 From: Jon Banafato Date: Fri, 8 Mar 2024 14:43:35 -0500 Subject: [PATCH] Update a yield statement loop to a yield from statement Pylint added a new `use-yield-from` in [version 3.1]. This results in a single linting error when running `tox`. This change updates a `yield` within a loop to a `yield from` per the linter's recommendation. [version 3.1]: https://pylint.readthedocs.io/en/stable/whatsnew/3/3.1/ --- mailmerge/__main__.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/mailmerge/__main__.py b/mailmerge/__main__.py index ee041e2..b4a1d9c 100644 --- a/mailmerge/__main__.py +++ b/mailmerge/__main__.py @@ -315,8 +315,7 @@ def read_csv_database(database_path): csvdialect.strict = True reader = csv.DictReader(database_file, dialect=csvdialect) try: - for row in reader: - yield row + yield from reader except csv.Error as err: raise exceptions.MailmergeError( f"{database_path}:{reader.line_num}: {err}"