Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve python 2/3 ABC fallback for pylint. #31848

Merged
merged 2 commits into from
Oct 17, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 5 additions & 2 deletions test/runner/lib/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

from __future__ import absolute_import, print_function

import abc
import errno
import inspect
import os
Expand All @@ -14,7 +13,11 @@
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():
Expand Down
1 change: 1 addition & 0 deletions test/sanity/code-smell/pylint-ansible-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down