From 8a017b427971b1687667f494b440361c9e99ec01 Mon Sep 17 00:00:00 2001 From: Arohan Ajit Date: Wed, 11 Sep 2024 04:58:43 -0400 Subject: [PATCH 1/2] resolved flake8 in utils --- utils/gitlog2changelog.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/utils/gitlog2changelog.py b/utils/gitlog2changelog.py index 2626321d6fb..758b142196b 100755 --- a/utils/gitlog2changelog.py +++ b/utils/gitlog2changelog.py @@ -66,8 +66,8 @@ author = authorList[1] author = author[0 : len(author) - 1] authorFound = True - except: - print("Could not parse authorList = '%s'" % (line)) + except Exception as e: + print(f"Could not parse authorList = '{line}'. Error: {e!s}") # Match the date line elif line.startswith("Date:"): @@ -76,8 +76,8 @@ date = dateList[1] date = date[0 : len(date) - 1] dateFound = True - except: - print("Could not parse dateList = '%s'" % (line)) + except Exception as e: + print(f"Could not parse dateList = '{line}'. Error: {e!s}") # The Fossil-IDs are ignored: elif line.startswith(" Fossil-ID:") or line.startswith(" [[SVN:"): continue From 6632b6551a8e8a38edd9f48e2620635e01a715b5 Mon Sep 17 00:00:00 2001 From: Arohan Ajit Date: Wed, 11 Sep 2024 05:18:48 -0400 Subject: [PATCH 2/2] updated .flake8 --- .flake8 | 1 - 1 file changed, 1 deletion(-) diff --git a/.flake8 b/.flake8 index 8a4bf960bf5..32021622d7d 100644 --- a/.flake8 +++ b/.flake8 @@ -21,7 +21,6 @@ per-file-ignores = # E741 ambiguous variable name 'l' __init__.py: F401, F403 lib/init/grass.py: E722, F821, F841 - utils/gitlog2changelog.py: E722, E712 man/build_check_rest.py: F403, F405 man/build_full_index_rest.py: F403, F405 man/parser_standard_options.py: F403, F405