@@ -47,7 +47,7 @@ class PyLint(base.Base):
for pythonpatch in self.pythonpatches:
# a condition checking whether a file is renamed or not
# unidiff doesn't support this yet
- if pythonpatch.target_file is not pythonpatch.path:
+ if pythonpatch.target_file != pythonpatch.path:
path = pythonpatch.target_file[2:]
else:
path = pythonpatch.path
@@ -55,9 +55,9 @@ class PyLint(base.Base):
reporter = TextReporter(pylint_output)
lint.Run([self.pylint_options, pythonpatch.path], reporter=reporter, exit=False)
for line in pylint_output.readlines():
- if not '*' in line:
- if line.strip():
- self.pylint_test[line.strip().split(' ',1)[0]] = line.strip().split(' ',1)[1]
+ if not '*' in line:
+ if line.strip():
+ self.pylint_test[line.strip().split(' ',1)[0]] = line.strip().split(' ',1)[1]
for issue in self.pylint_test:
if self.pylint_test[issue] not in self.pylint_pretest.values():
- Use "!=" instead of "is not" when checking for a renamed file - Fix the pylint readlines() block so that indentation is consistent with the rest of the module (four spaces instead of eight) Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com> --- meta/lib/patchtest/tests/test_python_pylint.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)