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
This commit is contained in:
Pierre Riteau 2020-10-05 18:32:56 +02:00
parent 762d354dc0
commit 2aa28e65cb
3 changed files with 8 additions and 7 deletions

View File

@ -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

View File

@ -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())

View File

@ -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