Linter Fixes

Found by the newest version of inspektor, 0.4.5.
Signed-off-by: NLucas Meneghel Rodrigues <lookkas@gmail.com>
上级 c485f90a
......@@ -97,6 +97,7 @@ class TreeNodeEnvOnly(object):
"""
Minimal TreeNode-like class providing interface for AvocadoParams
"""
def __init__(self, path, environment=None):
"""
:param path: Path of this node (must not end with '/')
......
......@@ -51,7 +51,7 @@ class Variants(CLICmd):
parser = super(Variants, self).configure(parser)
verbosity_levels = ("(positive integer - 0, 1, ... - or %s)"
% ", ".join(sorted(_VERBOSITY_LEVELS,
key=lambda _: _VERBOSITY_LEVELS[_])))
key=lambda _: _VERBOSITY_LEVELS[_])))
parser.add_argument("--summary", type=map_verbosity_level,
help="Verbosity of the variants summary. " +
verbosity_levels)
......
......@@ -95,7 +95,7 @@ class Asset(object):
# - Be valid (not expired).
# - Be verified (hash check).
if (os.path.isfile(self.asset_file) and
not self._is_expired(self.asset_file, self.expire)):
not self._is_expired(self.asset_file, self.expire)):
try:
with FileLock(self.asset_file, 1):
if self._verify():
......
......@@ -17,7 +17,7 @@ import os
import shutil
import logging
import tempfile
from distutils.version import LooseVersion
from distutils.version import LooseVersion # pylint: disable=E0611
from . import asset, archive, build
......
......@@ -1140,8 +1140,9 @@ class PluginsXunitTest(AbsPluginsTest, unittest.TestCase):
def setUp(self):
self.tmpdir = tempfile.mkdtemp(prefix='avocado_' + __name__)
self.junit = os.path.abspath(os.path.join(os.path.dirname(__file__),
os.path.pardir, ".data", 'junit-4.xsd'))
junit_xsd = os.path.join(os.path.dirname(__file__),
os.path.pardir, ".data", 'junit-4.xsd')
self.junit = os.path.abspath(junit_xsd)
super(PluginsXunitTest, self).setUp()
def run_and_check(self, testname, e_rc, e_ntests, e_nerrors,
......
......@@ -34,8 +34,8 @@ class TestDataStructures(unittest.TestCase):
matrix1 = [["header", 51.7, 60], [1, 0, 0]]
matrix2 = [["header", 57.2, 54], [2, 51, 0]]
self.assertEqual(data_structures.compare_matrices(matrix1, matrix2),
([["header", '+10.6383', -10.0], ['+100',
'error_51/0', '.']], 3, 1, 5))
([["header", '+10.6383', -10.0],
['+100', 'error_51/0', '.']], 3, 1, 5))
def test_lazy_property(self):
"""
......
......@@ -20,6 +20,7 @@ class _FakeVM(avocado_runner_vm.VM):
Fake VM-inherited object (it's better to inherit it, than to flexmock the
isinstance)
"""
def __init__(self): # pylint: disable=W0231
# don't call avocado_runner_vm.VM.__init__
self.snapshot = True
......
......@@ -47,8 +47,9 @@ class xUnitSucceedTest(unittest.TestCase):
self.test1 = SimpleTest(job=self.job, base_logdir=self.tmpdir)
self.test1._Test__status = 'PASS'
self.test1.time_elapsed = 1.23
self.junit = os.path.abspath(os.path.join(os.path.dirname(__file__),
os.path.pardir, ".data", 'junit-4.xsd'))
junit_xsd = os.path.join(os.path.dirname(__file__),
os.path.pardir, ".data", 'junit-4.xsd')
self.junit = os.path.abspath(junit_xsd)
def tearDown(self):
os.close(self.tmpfile[0])
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册