diff --git a/tools/lint/test/test_yaml.py b/tools/lint/test/test_yaml.py index a540c43b4ceb..c4d206086439 100644 --- a/tools/lint/test/test_yaml.py +++ b/tools/lint/test/test_yaml.py @@ -11,7 +11,7 @@ def test_basic(lint, paths): assert len(results) == 2 - assert "line too long (122 > 80 characters)'" in results[0].message + assert "line too long (122 > 80 characters)" in results[0].message assert results[0].level == "error" assert "bad.yml" in results[0].relpath assert results[0].lineno == 3 diff --git a/tools/lint/yamllint_/__init__.py b/tools/lint/yamllint_/__init__.py index 5efd66f7449b..f1304ac66c97 100644 --- a/tools/lint/yamllint_/__init__.py +++ b/tools/lint/yamllint_/__init__.py @@ -22,8 +22,7 @@ Unable to install correct version of yamllint Try to install it manually with: $ pip install -U --require-hashes -r {} """.strip().format(YAMLLINT_REQUIREMENTS_PATH) - -YAMLLINT_FORMAT_REGEX = re.compile(b'(.*):(.*):(.*): \[(error|warning)\] (.*) \((.*)\)$') +YAMLLINT_FORMAT_REGEX = re.compile('(.*):(.*):(.*): \[(error|warning)\] (.*) \((.*)\)$') results = []