Uncap the flake8 version

The old flake8 version we used was causing trouble. This commit
uncaps the flake8 version, and fixes the new warnings and errors.

Change-Id: I533ddcc8fc14dfaf9dd32fa3e69f4acee06ceae7
This commit is contained in:
Javier Pena 2020-10-21 10:22:07 +02:00
parent 5f30bdcfa6
commit 7fea3fa052
2 changed files with 9 additions and 9 deletions

View File

@ -1,7 +1,7 @@
# 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.
flake8<2.6.0,>=2.5.4 # MIT
flake8 # MIT
packaging # Apache-2.0
lxml!=3.7.0 # BSD
PrettyTable<0.8 # BSD

View File

@ -55,7 +55,7 @@ def _process_status(args=None):
yaml_files += [os.path.join(releases_yaml_dir, f)
for f in os.listdir(releases_yaml_dir)]
for yaml_file in yaml_files:
project_name = re.sub('\.ya?ml$', '', os.path.basename(yaml_file))
project_name = re.sub(r'\.ya?ml$', '', os.path.basename(yaml_file))
# skip projects if include list is given
if len(args['include_projects']) and \
project_name not in args['include_projects']:
@ -205,15 +205,15 @@ def find_rpm_packaging_pkg_version(pkg_project_spec):
"""get a spec.j2 template and get the version"""
if os.path.exists(pkg_project_spec):
with open(pkg_project_spec) as f:
for l in f:
for line in f:
# if the template variable 'upstream_version' is set, use that
m = re.search(
"{%\s*set upstream_version\s*=\s*(?:upstream_version\()?"
"'(?P<version>.*)'(?:\))?\s*%}$", l)
r"{%\s*set upstream_version\s*=\s*(?:upstream_version\()?"
r"'(?P<version>.*)'(?:\))?\s*%}$", line)
if m:
return version.parse(m.group('version'))
# check the Version field
m = re.search('^Version:\s*(?P<version>.*)\s*$', l)
m = re.search(r'^Version:\s*(?P<version>.*)\s*$', line)
if m:
if m.group('version') == '{{ py2rpmversion() }}':
return 'version unset'
@ -296,10 +296,10 @@ def output_html(release, projects, include_obs):
def read_upper_constraints(filename):
uc = dict()
with open(filename) as f:
for l in f.readlines():
for line in f.readlines():
# ignore markers for now
l = l.split(';')[0]
r = Requirement(l)
line = line.split(';')[0]
r = Requirement(line)
for s in r.specifier:
uc[r.name] = s.version
# there is only a single version in upper constraints