From 6155afbcedba78aabc4b60815479779f5a331dca Mon Sep 17 00:00:00 2001 From: Takashi Kajinami Date: Thu, 19 Sep 2024 21:53:32 +0900 Subject: [PATCH] Bump hacking ... and fix the errors newly detected. ``` ./bashate/bashate.py:300:15: F504 '...' % ... has unused named argument(s): line, warn print("%(filename)s:%(filelineno)s:1: %(error)s" % ^ ./bashate/messages.py:238:17: E741 ambiguous variable name 'l' for l in v.long_msg.split('\n'): ^ ``` Change-Id: I69a7682494550513b5190480ceb79315c501c383 --- bashate/bashate.py | 4 +--- bashate/messages.py | 4 ++-- requirements.txt | 4 ---- test-requirements.txt | 7 ++----- 4 files changed, 5 insertions(+), 14 deletions(-) diff --git a/bashate/bashate.py b/bashate/bashate.py index d980cd5..47f0ad2 100755 --- a/bashate/bashate.py +++ b/bashate/bashate.py @@ -300,9 +300,7 @@ class BashateRun(object): print("%(filename)s:%(filelineno)s:1: %(error)s" % {'filename': filename, 'filelineno': filelineno, - 'warn': "W" if warn else "E", - 'error': error.replace(":", "", 1), - 'line': line.rstrip('\n')}) + 'error': error.replace(":", "", 1)}) def check_files(self, files, verbose, max_line_length=79): logical_line = "" diff --git a/bashate/messages.py b/bashate/messages.py index 1df90fc..cfbea18 100644 --- a/bashate/messages.py +++ b/bashate/messages.py @@ -235,6 +235,6 @@ def print_messages(): 'id': v.msg_id, 'string': v.msg_str}) if v.long_msg: - for l in v.long_msg.split('\n'): - print(" %s" % l) + for msg_line in v.long_msg.split('\n'): + print(" %s" % msg_line) print("") diff --git a/requirements.txt b/requirements.txt index 6de9f4e..7deef88 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1 @@ -# The order of packages is significant, because pip processes them in the order -# of appearance. Changing the order has an impact on the overall integration -# process, which may cause wedges in the gate later. - pbr!=2.1.0,>=2.0.0 # Apache-2.0 diff --git a/test-requirements.txt b/test-requirements.txt index e2270b0..d2276ee 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -1,8 +1,5 @@ -# The order of packages is significant, because pip processes them in the order -# of appearance. Changing the order has an impact on the overall integration -# process, which may cause wedges in the gate later. - -hacking>=3.0.1,<3.1.0 # Apache-2.0 +hacking>=4.1.0,<4.2.0;python_version<'3.8' # Apache-2.0 +hacking>=7.0.0,<7.1.0;python_version>='3.8' # Apache-2.0 coverage>=3.6 discover