From d65d8d6e130aa01d6fbe93594f885bbe77b3cf25 Mon Sep 17 00:00:00 2001 From: Matt Clay Date: Tue, 23 Jul 2019 15:40:27 -0700 Subject: [PATCH] Fix default pylint config for collections. --- test/runner/lib/sanity/pylint.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/test/runner/lib/sanity/pylint.py b/test/runner/lib/sanity/pylint.py index bab2301caf5..f5df16b3e4a 100644 --- a/test/runner/lib/sanity/pylint.py +++ b/test/runner/lib/sanity/pylint.py @@ -176,7 +176,10 @@ class PylintTest(SanitySingleVersion): rcfile = os.path.join(ANSIBLE_ROOT, 'test/sanity/pylint/config/%s' % context.split('/')[0]) if not os.path.exists(rcfile): - rcfile = os.path.join(ANSIBLE_ROOT, 'test/sanity/pylint/config/default') + if data_context().content.collection: + rcfile = os.path.join(ANSIBLE_ROOT, 'test/sanity/pylint/config/collection') + else: + rcfile = os.path.join(ANSIBLE_ROOT, 'test/sanity/pylint/config/default') parser = ConfigParser() parser.read(rcfile)