1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

fix string_format sanity check (#51780)

* newer version of Pylint moved the impl; use conditional import to find for new/old
This commit is contained in:
Matt Davis 2019-02-05 17:07:01 -08:00 committed by GitHub
parent 06d83bae05
commit 6654c7aeea
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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)