Fix the only offense of E731
This commit is contained in:
parent
0dd8b50194
commit
d39eca2885
2
.flake8
2
.flake8
@ -1,4 +1,4 @@
|
||||
[flake8]
|
||||
exclude = abichecker
|
||||
max-line-length = 100
|
||||
ignore = E501,F401,E128,E251,E201,E202,E302,E305,F841,E261,E712,E126,E711,E125,E123,E101,E124,E127,E701,E714,W504,E129,E741,E722,E731
|
||||
ignore = E501,F401,E128,E251,E201,E202,E302,E305,F841,E261,E712,E126,E711,E125,E123,E101,E124,E127,E701,E714,W504,E129,E741,E722
|
||||
|
@ -28,13 +28,19 @@ def project_list_family(apiurl, project, include_update=False):
|
||||
return [project + project_suffix]
|
||||
|
||||
count_original = project.count(':')
|
||||
|
||||
def filter_sle_updates(p):
|
||||
return p.count(':') == count_original and (p.endswith(':GA') or (include_update and p.endswith(':Update')))
|
||||
|
||||
def filter_opensuse_updates(p):
|
||||
return p.count(':') == count_original or (include_update and p.count(':') == count_original + 1 and p.endswith(':Update'))
|
||||
|
||||
if project.startswith('SUSE:SLE'):
|
||||
project = ':'.join(project.split(':')[:2])
|
||||
family_filter = lambda p: p.count(':') == count_original and (
|
||||
p.endswith(':GA') or (include_update and p.endswith(':Update')))
|
||||
|
||||
family_filter = filter_sle_updates
|
||||
else:
|
||||
family_filter = lambda p: p.count(':') == count_original or (
|
||||
include_update and p.count(':') == count_original + 1 and p.endswith(':Update'))
|
||||
family_filter = filter_opensuse_updates
|
||||
|
||||
prefix = ':'.join(project.split(':')[:-1])
|
||||
projects = project_list_prefix(apiurl, prefix)
|
||||
|
Loading…
x
Reference in New Issue
Block a user