diff --git a/renderspec/versions.py b/renderspec/versions.py index 30c6098..b7d888b 100644 --- a/renderspec/versions.py +++ b/renderspec/versions.py @@ -24,13 +24,13 @@ def get_requirements(lines): """parse the given lines and return a dict with pkg_name->version. lines must follow PEP0508""" requires = {} - for l in lines: + for line in lines: # skip comments and empty lines - if l.startswith('#') or len(l.strip()) == 0: + if line.startswith('#') or len(line.strip()) == 0: continue # remove trailing comments - l = l.split('#')[0].rstrip(' ') - r = Requirement(l) + line = line.split('#')[0].rstrip(' ') + r = Requirement(line) # check if we need the requirement if r.marker: # TODO (toabctl): currently we hardcode python 2.7 and linux2 diff --git a/test-requirements.txt b/test-requirements.txt index 9dd2f8e..c0a4dc9 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -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>=3.5.0 # MIT testrepository>=0.0.18 # Apache-2.0/BSD testresources>=2.0.0 # Apache-2.0/BSD testtools>=1.4.0 # MIT