mirror of
https://opendev.org/openstack/ansible-collections-openstack.git
synced 2026-05-07 22:03:09 +00:00
Merge "Remove F403 and F405 exclusions"
This commit is contained in:
@@ -33,12 +33,12 @@ try:
|
|||||||
# Allow wildcard import because we really do want to import all of mock's
|
# Allow wildcard import because we really do want to import all of mock's
|
||||||
# symbols into this compat shim
|
# symbols into this compat shim
|
||||||
# pylint: disable=wildcard-import,unused-wildcard-import
|
# pylint: disable=wildcard-import,unused-wildcard-import
|
||||||
from unittest.mock import *
|
from unittest.mock import * # noqa
|
||||||
except ImportError:
|
except ImportError:
|
||||||
# Python 2
|
# Python 2
|
||||||
# pylint: disable=wildcard-import,unused-wildcard-import
|
# pylint: disable=wildcard-import,unused-wildcard-import
|
||||||
try:
|
try:
|
||||||
from mock import *
|
from mock import * # noqa
|
||||||
except ImportError:
|
except ImportError:
|
||||||
print('You need the mock library installed on python2.x to run tests')
|
print('You need the mock library installed on python2.x to run tests')
|
||||||
|
|
||||||
@@ -102,9 +102,9 @@ if sys.version_info >= (3,) and sys.version_info < (3, 4, 4):
|
|||||||
file_spec = list(set(dir(_io.TextIOWrapper)).union(set(dir(_io.BytesIO))))
|
file_spec = list(set(dir(_io.TextIOWrapper)).union(set(dir(_io.BytesIO))))
|
||||||
|
|
||||||
if mock is None:
|
if mock is None:
|
||||||
mock = MagicMock(name='open', spec=open)
|
mock = MagicMock(name='open', spec=open) # noqa
|
||||||
|
|
||||||
handle = MagicMock(spec=file_spec)
|
handle = MagicMock(spec=file_spec) # noqa
|
||||||
handle.__enter__.return_value = handle
|
handle.__enter__.return_value = handle
|
||||||
|
|
||||||
_data = _iterate_read_data(read_data)
|
_data = _iterate_read_data(read_data)
|
||||||
|
|||||||
@@ -31,8 +31,8 @@ import sys
|
|||||||
if sys.version_info < (2, 7):
|
if sys.version_info < (2, 7):
|
||||||
try:
|
try:
|
||||||
# Need unittest2 on python2.6
|
# Need unittest2 on python2.6
|
||||||
from unittest2 import *
|
from unittest2 import * # noqa
|
||||||
except ImportError:
|
except ImportError:
|
||||||
print('You need unittest2 installed on python2.6.x to run tests')
|
print('You need unittest2 installed on python2.6.x to run tests')
|
||||||
else:
|
else:
|
||||||
from unittest import *
|
from unittest import * # noqa
|
||||||
|
|||||||
2
tox.ini
2
tox.ini
@@ -51,7 +51,7 @@ commands = {posargs}
|
|||||||
# H4 are rules for docstrings. Maybe we should clean them?
|
# H4 are rules for docstrings. Maybe we should clean them?
|
||||||
# E501,E402,H301,H236,F401,E128 are ignored so we can import the existing
|
# E501,E402,H301,H236,F401,E128 are ignored so we can import the existing
|
||||||
# modules unchanged and then clean them in subsequent patches.
|
# modules unchanged and then clean them in subsequent patches.
|
||||||
ignore = W503,H4,E501,E402,H301,H236,F401,E128,W504,F403,F405
|
ignore = W503,H4,E501,E402,H301,H236,F401,E128,W504
|
||||||
show-source = True
|
show-source = True
|
||||||
exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build,ansible_collections
|
exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build,ansible_collections
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user