mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-07 13:52:54 +00:00
Improve python 2/3 ABC fallback for pylint. (#31848)
* Improve python 2/3 ABC fallback for pylint. * Allow longer method names in ansible-test.
This commit is contained in:
@@ -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():
|
||||
|
||||
Reference in New Issue
Block a user