1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2026-05-05 09:45:13 +00:00

remove code handling unsupported Python versions (#9496)

* remove code handling unsupported Python versions

* drop unused import

* remove no longer needed ignore lines
This commit is contained in:
Alexei Znamensky 2024-12-31 22:37:10 +13:00 committed by GitHub
parent 7f3fef3038
commit 43d5d6e2ce
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 1 additions and 99 deletions

View file

@ -10,16 +10,7 @@ __metaclass__ = type
Compat module for Python2.7's unittest module
'''
import sys
# Allow wildcard import because we really do want to import all of
# unittests's symbols into this compat shim
# pylint: disable=wildcard-import,unused-wildcard-import
if sys.version_info < (2, 7):
try:
# Need unittest2 on python2.6
from unittest2 import * # noqa: F401, pylint: disable=unused-import
except ImportError:
print('You need unittest2 installed on python2.6.x to run tests')
else:
from unittest import * # noqa: F401, pylint: disable=unused-import
from unittest import * # noqa: F401, pylint: disable=unused-import