From 6654c7aeea70a12fb848073ca3b0c377cf79e3d1 Mon Sep 17 00:00:00 2001 From: Matt Davis Date: Tue, 5 Feb 2019 17:07:01 -0800 Subject: [PATCH] fix string_format sanity check (#51780) * newer version of Pylint moved the impl; use conditional import to find for new/old --- test/sanity/pylint/plugins/string_format.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/test/sanity/pylint/plugins/string_format.py b/test/sanity/pylint/plugins/string_format.py index c9808cf399..ed3918bb2e 100644 --- a/test/sanity/pylint/plugins/string_format.py +++ b/test/sanity/pylint/plugins/string_format.py @@ -13,7 +13,10 @@ from pylint.interfaces import IAstroidChecker from pylint.checkers import BaseChecker from pylint.checkers import utils from pylint.checkers.utils import check_messages -from pylint.checkers.strings import parse_format_method_string +try: + from pylint.checkers.utils import parse_format_method_string +except ImportError: + from pylint.checkers.strings import parse_format_method_string _PY3K = sys.version_info[:2] >= (3, 0)