From 2aa28e65cb0a1e7d4403824c0db62e76352e9942 Mon Sep 17 00:00:00 2001 From: Pierre Riteau Date: Mon, 5 Oct 2020 18:32:56 +0200 Subject: [PATCH] Fix pep8 failures The openstack-tox-pep8 job is failing with: AttributeError: 'FlakesChecker' object has no attribute 'CONSTANT' Fix by using a newer version of hacking and fix problems it found. Change-Id: I26e7309d9f90cbad877f8f65ba8c2ec0ee023c70 --- test-requirements.txt | 2 +- tools/check_chair.py | 11 ++++++----- tools/count_slot_usage.py | 2 +- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/test-requirements.txt b/test-requirements.txt index 77daa411..911181a4 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -1,4 +1,4 @@ -hacking<0.11,>=0.10.0 +hacking>=3.0.1,<3.1.0 # Apache-2.0 pytz>=2013.6 # MIT PyYAML>=3.1.0 # MIT requests>=2.10.0 # Apache-2.0 diff --git a/tools/check_chair.py b/tools/check_chair.py index 3b98ddbd..f6e8e230 100644 --- a/tools/check_chair.py +++ b/tools/check_chair.py @@ -59,12 +59,13 @@ A tool that checks a meeting chair matches the canonical format. meetings = meeting.load_meetings(args.yaml_dir) return_code = 0 for m in meetings: - ok, msg = check_chair(m.chair) - if not ok: - return_code = 1 - print(m.filefrom) - print(msg.rstrip()) + ok, msg = check_chair(m.chair) + if not ok: + return_code = 1 + print(m.filefrom) + print(msg.rstrip()) return return_code + if __name__ == '__main__': sys.exit(main()) diff --git a/tools/count_slot_usage.py b/tools/count_slot_usage.py index 5bbb978a..dbc9601d 100755 --- a/tools/count_slot_usage.py +++ b/tools/count_slot_usage.py @@ -123,7 +123,7 @@ def calculate_meeting_counts(meetings): # assumes that we don't have any meetings that are longer than # 60mins) if (mins + duration) > 60: - meeting_counts[(hour+1) % 24][day].append(meeting_info) + meeting_counts[(hour + 1) % 24][day].append(meeting_info) return meeting_counts