From d67b436eba9f085ba7ed20e14b4f95cdf8f12231 Mon Sep 17 00:00:00 2001 From: Matt Clay Date: Tue, 14 Feb 2023 11:34:39 -0800 Subject: [PATCH] ansible-test - Improve pylint backwards compat (#79997) --- changelogs/fragments/ansible-test-pylint-string-format.yml | 2 +- .../_util/controller/sanity/pylint/plugins/string_format.py | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/changelogs/fragments/ansible-test-pylint-string-format.yml b/changelogs/fragments/ansible-test-pylint-string-format.yml index e6e38803595..744f70833f8 100644 --- a/changelogs/fragments/ansible-test-pylint-string-format.yml +++ b/changelogs/fragments/ansible-test-pylint-string-format.yml @@ -1,3 +1,3 @@ minor_changes: - - ansible-test - Removed the ``ansible-format-automatic-specification`` rule from the ``pylint`` sanity test, + - ansible-test - Disabled the ``ansible-format-automatic-specification`` rule from the ``pylint`` sanity test, now that Python 2.6 is no longer supported. diff --git a/test/lib/ansible_test/_util/controller/sanity/pylint/plugins/string_format.py b/test/lib/ansible_test/_util/controller/sanity/pylint/plugins/string_format.py index db2765fd0c6..55ee9007b67 100644 --- a/test/lib/ansible_test/_util/controller/sanity/pylint/plugins/string_format.py +++ b/test/lib/ansible_test/_util/controller/sanity/pylint/plugins/string_format.py @@ -11,6 +11,9 @@ from pylint.checkers import utils from pylint.checkers.utils import check_messages MSGS = { + 'E9305': ("disabled", # kept for backwards compatibility with inline ignores, remove after 2.14 is EOL + "ansible-format-automatic-specification", + "disabled"), 'E9390': ("bytes object has no .format attribute", "ansible-no-format-on-bytestring", "Used when a bytestring was used as a PEP 3101 format string "