- 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 <[email protected]> --- meta/lib/patchtest/tests/test_python_pylint.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/meta/lib/patchtest/tests/test_python_pylint.py b/meta/lib/patchtest/tests/test_python_pylint.py index ec9129bc79..37d1de9436 100644 --- a/meta/lib/patchtest/tests/test_python_pylint.py +++ b/meta/lib/patchtest/tests/test_python_pylint.py @@ -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(): -- 2.54.0
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#240063): https://lists.openembedded.org/g/openembedded-core/message/240063 Mute This Topic: https://lists.openembedded.org/mt/120084844/21656 Group Owner: [email protected] Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
