scripts/pythondistdeps: Deal with some flake8 warnings
flake8 is mostly unhappy with pythondistdeps.py, so clean up most of them, which is whitespace changes.
This commit is contained in:
parent
3f7b03af43
commit
25a8dfae1a
|
@ -58,6 +58,7 @@ class RpmVersion():
|
|||
rpm_suffix = ''
|
||||
return '{}{}{}'.format(rpm_epoch, rpm_version, rpm_suffix)
|
||||
|
||||
|
||||
def convert_compatible(name, operator, version_id):
|
||||
if version_id.endswith('.*'):
|
||||
print('Invalid requirement: {} {} {}'.format(name, operator, version_id))
|
||||
|
@ -72,6 +73,7 @@ def convert_compatible(name, operator, version_id):
|
|||
return '({} >= {} with {} < {})'.format(
|
||||
name, version, name, upper_version)
|
||||
|
||||
|
||||
def convert_equal(name, operator, version_id):
|
||||
if version_id.endswith('.*'):
|
||||
version_id = version_id[:-2] + '.0'
|
||||
|
@ -79,6 +81,7 @@ def convert_equal(name, operator, version_id):
|
|||
version = RpmVersion(version_id)
|
||||
return '{} = {}'.format(name, version)
|
||||
|
||||
|
||||
def convert_arbitrary_equal(name, operator, version_id):
|
||||
if version_id.endswith('.*'):
|
||||
print('Invalid requirement: {} {} {}'.format(name, operator, version_id))
|
||||
|
@ -86,6 +89,7 @@ def convert_arbitrary_equal(name, operator, version_id):
|
|||
version = RpmVersion(version_id)
|
||||
return '{} = {}'.format(name, version)
|
||||
|
||||
|
||||
def convert_not_equal(name, operator, version_id):
|
||||
if version_id.endswith('.*'):
|
||||
version_id = version_id[:-2]
|
||||
|
@ -97,6 +101,7 @@ def convert_not_equal(name, operator, version_id):
|
|||
return '({} < {} or {} > {})'.format(
|
||||
name, version, name, lower_version)
|
||||
|
||||
|
||||
def convert_ordered(name, operator, version_id):
|
||||
if version_id.endswith('.*'):
|
||||
# PEP 440 does not define semantics for prefix matching
|
||||
|
|
Loading…
Reference in New Issue