diff --git a/test/runner/lib/util.py b/test/runner/lib/util.py index 8466fa001f..b61f5ea583 100644 --- a/test/runner/lib/util.py +++ b/test/runner/lib/util.py @@ -2,7 +2,6 @@ from __future__ import absolute_import, print_function -import abc import errno import inspect import os @@ -14,7 +13,11 @@ import re import sys import time -ABC = abc.ABCMeta('ABC', (object,), {'__slots__': ()}) # compatible with Python 2 *and* 3 +try: + from abc import ABC +except ImportError: + from abc import ABCMeta + ABC = ABCMeta('ABC', (), {}) def is_shippable(): diff --git a/test/sanity/code-smell/pylint-ansible-test.sh b/test/sanity/code-smell/pylint-ansible-test.sh index 3a92a02d26..058181e4e8 100755 --- a/test/sanity/code-smell/pylint-ansible-test.sh +++ b/test/sanity/code-smell/pylint-ansible-test.sh @@ -6,6 +6,7 @@ pylint --max-line-length=160 --reports=n ./*.py ./*/*.py ./*/*/*.py \ --jobs 2 \ --rcfile /dev/null \ --function-rgx '[a-z_][a-z0-9_]{2,40}$' \ + --method-rgx '[a-z_][a-z0-9_]{2,40}$' \ -d unused-import \ -d too-few-public-methods \ -d too-many-arguments \