提交 ca80f2d7 编写于 作者: L Lukáš Doktor

pylint: Avoid W0102 (dangerous argument)

Despite the reviews we have some W0102s that potentially corrupts the
arguments. Let's get rid of them.
Signed-off-by: NLukáš Doktor <ldoktor@redhat.com>
上级 645457df
......@@ -34,7 +34,9 @@ class Dispatcher(EnabledExtensionManager):
#: Default namespace prefix for Avocado extensions
NAMESPACE_PREFIX = 'avocado.plugins.'
def __init__(self, namespace, invoke_kwds={}):
def __init__(self, namespace, invoke_kwds=None):
if invoke_kwds is None:
invoke_kwds = {}
self.load_failures = []
super(Dispatcher, self).__init__(namespace=namespace,
check_func=self.enabled,
......
......@@ -543,7 +543,7 @@ class GDB(object):
raise UnexpectedResponseError
return r
def run(self, args=[]):
def run(self, args=None):
"""
Runs the application inside the debugger
......
......@@ -4,7 +4,7 @@ import time
log = logging.getLogger('avocado.test')
def wait_for(func, timeout, first=0.0, step=1.0, text=None, args=[], kwargs={}):
def wait_for(func, timeout, first=0.0, step=1.0, text=None, args=None, kwargs=None):
"""
Wait until func() evaluates to True.
......@@ -18,6 +18,10 @@ def wait_for(func, timeout, first=0.0, step=1.0, text=None, args=[], kwargs={}):
:param args: Positional arguments to func
:param kwargs: Keyword arguments to func
"""
if args is None:
args = []
if kwargs is None:
kwargs = {}
start_time = time.time()
end_time = time.time() + timeout
......
......@@ -24,7 +24,9 @@ class JobTest(unittest.TestCase):
self.tmpdir = tempfile.mkdtemp(prefix="avocado_" + __name__)
@staticmethod
def _find_simple_test_candidates(candidates=['true', 'time', 'uptime']):
def _find_simple_test_candidates(candidates=None):
if candidates is None:
candidates = ['true', 'time', 'uptime']
found = []
for candidate in candidates:
try:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册