mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Fix PyLint bad-option-value
This commit is contained in:
parent
870a7335a0
commit
6513c848bc
8 changed files with 10 additions and 10 deletions
|
@ -156,7 +156,7 @@ def get(key,
|
|||
'skipped.', default, ret, type(ret).__name__
|
||||
)
|
||||
elif isinstance(default, list):
|
||||
ret = salt.utils.data.traverse_dict_and_list( # pylint: disable=redefined-variable-type
|
||||
ret = salt.utils.data.traverse_dict_and_list(
|
||||
pillar_dict,
|
||||
key,
|
||||
[],
|
||||
|
|
|
@ -74,7 +74,7 @@ class SleekXMPPMUC(logging.Filter):
|
|||
|
||||
class SendMsgBot(_ClientXMPP):
|
||||
|
||||
def __init__(self, jid, password, recipient, msg): # pylint: disable=E1002
|
||||
def __init__(self, jid, password, recipient, msg):
|
||||
# PyLint wrongly reports an error when calling super, hence the above
|
||||
# disable call
|
||||
super(SendMsgBot, self).__init__(jid, password)
|
||||
|
|
|
@ -23,7 +23,7 @@ class SynchronizingWebsocket(WebSocket):
|
|||
initially connect. These jobs help gather information about minions, jobs,
|
||||
and documentation.
|
||||
'''
|
||||
def __init__(self, *args, **kwargs): # pylint: disable=E1002
|
||||
def __init__(self, *args, **kwargs):
|
||||
super(SynchronizingWebsocket, self).__init__(*args, **kwargs)
|
||||
|
||||
# This pipe needs to represent the parent end of a pipe.
|
||||
|
|
|
@ -258,7 +258,7 @@ class Any(Future):
|
|||
'''
|
||||
Future that wraps other futures to "block" until one is done
|
||||
'''
|
||||
def __init__(self, futures): # pylint: disable=E1002
|
||||
def __init__(self, futures):
|
||||
super(Any, self).__init__()
|
||||
for future in futures:
|
||||
future.add_done_callback(self.done_callback)
|
||||
|
|
|
@ -134,7 +134,7 @@ def __virtual__():
|
|||
|
||||
class SendMsgBot(_ClientXMPP):
|
||||
|
||||
def __init__(self, jid, password, recipient, msg): # pylint: disable=E1002
|
||||
def __init__(self, jid, password, recipient, msg):
|
||||
# PyLint wrongly reports an error when calling super, hence the above
|
||||
# disable call
|
||||
super(SendMsgBot, self).__init__(jid, password)
|
||||
|
|
|
@ -50,7 +50,7 @@ def _decode_embedded_list(src):
|
|||
if isinstance(elem, dict):
|
||||
elem = _decode_embedded_dict(elem)
|
||||
elif isinstance(elem, list):
|
||||
elem = _decode_embedded_list(elem) # pylint: disable=redefined-variable-type
|
||||
elem = _decode_embedded_list(elem)
|
||||
elif isinstance(elem, bytes):
|
||||
try:
|
||||
elem = elem.decode()
|
||||
|
@ -70,7 +70,7 @@ def _decode_embedded_dict(src):
|
|||
if isinstance(val, dict):
|
||||
val = _decode_embedded_dict(val)
|
||||
elif isinstance(val, list):
|
||||
val = _decode_embedded_list(val) # pylint: disable=redefined-variable-type
|
||||
val = _decode_embedded_list(val)
|
||||
elif isinstance(val, bytes):
|
||||
try:
|
||||
val = val.decode()
|
||||
|
@ -105,7 +105,7 @@ def decode_embedded_strs(src):
|
|||
return _decode_embedded_list(src)
|
||||
elif isinstance(src, bytes):
|
||||
try:
|
||||
return src.decode() # pylint: disable=redefined-variable-type
|
||||
return src.decode()
|
||||
except UnicodeError:
|
||||
return src
|
||||
else:
|
||||
|
|
|
@ -274,7 +274,7 @@ def get_function_argspec(func, is_class_method=None):
|
|||
aspec = _getargspec(func)
|
||||
del aspec.args[0] # self
|
||||
elif inspect.isfunction(func):
|
||||
aspec = _getargspec(func) # pylint: disable=redefined-variable-type
|
||||
aspec = _getargspec(func)
|
||||
elif inspect.ismethod(func):
|
||||
aspec = _getargspec(func)
|
||||
del aspec.args[0] # self
|
||||
|
|
|
@ -59,7 +59,7 @@ except ImportError as exc:
|
|||
pprint.pprint(sys.path)
|
||||
six.reraise(*sys.exc_info())
|
||||
|
||||
from tests.integration import TestDaemon, TestDaemonStartFailed # pylint: disable=W0403
|
||||
from tests.integration import TestDaemon, TestDaemonStartFailed
|
||||
from tests.multimaster import MultimasterTestDaemon
|
||||
import salt.utils.platform
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue