mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 17:09:03 +00:00
Fix remaining pylint issues.
This commit is contained in:
parent
158ea87407
commit
4b82ab4a9c
@ -50,6 +50,7 @@ import salt.utils.pkg
|
||||
from salt.exceptions import CommandExecutionError
|
||||
from salt.ext import six
|
||||
from salt.ext.six.moves import zip # pylint: disable=redefined-builtin
|
||||
from functools import reduce
|
||||
|
||||
# Define the module's virtual name
|
||||
__virtualname__ = 'pkg'
|
||||
@ -313,7 +314,7 @@ def version(*names, **kwargs):
|
||||
ret[_ips_get_pkgname(line)] = _ips_get_pkgversion(line)
|
||||
|
||||
# Append package names which are not installed/found
|
||||
unmatched = list(filter(lambda name: not reduce(lambda x, y: x or name in y, ret, False), names))
|
||||
unmatched = list([name for name in names if not reduce(lambda x, y: x or name in y, ret, False)])
|
||||
ret.update(zip(unmatched, itertools.cycle(('',))))
|
||||
|
||||
# Return a string if only one package name passed
|
||||
@ -372,7 +373,7 @@ def latest_version(*names, **kwargs):
|
||||
ret[name] = ''
|
||||
|
||||
# Append package names which are not found
|
||||
unmatched = list(filter(lambda name: not reduce(lambda x, y: x or name in y, ret, False), names))
|
||||
unmatched = list([name for name in names if not reduce(lambda x, y: x or name in y, ret, False)])
|
||||
ret.update(zip(unmatched, itertools.cycle(('',))))
|
||||
|
||||
# Return a string if only one package name passed
|
||||
|
Loading…
Reference in New Issue
Block a user