Enable H407,H305,H307,E122 ignore E123
After bumping the hacking version to the 0.9.x series ignores were added for several rules. This commit fixes the violations for a subset of these rules and re-enables the checks. E123 is ignored because this rule is ignored in the default pep8 by default, due to a lack of consensus around it. Change-Id: I8f14cd2ca6afc38d3fe8ee758272071111022896
This commit is contained in:
parent
fceab11864
commit
96e9e88dc0
@ -15,9 +15,9 @@
|
||||
|
||||
import base64
|
||||
import logging
|
||||
import urlparse
|
||||
|
||||
import testtools
|
||||
import urlparse
|
||||
|
||||
from tempest.api.compute import base
|
||||
from tempest.common.utils import data_utils
|
||||
|
@ -14,9 +14,9 @@
|
||||
# under the License.
|
||||
|
||||
import logging
|
||||
import urlparse
|
||||
|
||||
import testtools
|
||||
import urlparse
|
||||
|
||||
from tempest.api.compute import base
|
||||
from tempest.common.utils import data_utils
|
||||
|
@ -13,11 +13,13 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from testtools import matchers
|
||||
|
||||
from tempest.api.compute import base
|
||||
from tempest.common.utils import data_utils
|
||||
from tempest import config
|
||||
from tempest import test
|
||||
from testtools import matchers
|
||||
|
||||
|
||||
CONF = config.CONF
|
||||
|
||||
|
@ -12,6 +12,7 @@
|
||||
|
||||
import datetime
|
||||
import re
|
||||
|
||||
from tempest.api.identity import base
|
||||
from tempest import auth
|
||||
from tempest import clients
|
||||
|
@ -17,10 +17,11 @@ import cStringIO as StringIO
|
||||
import hashlib
|
||||
import random
|
||||
import re
|
||||
import six
|
||||
import time
|
||||
import zlib
|
||||
|
||||
import six
|
||||
|
||||
from tempest.api.object_storage import base
|
||||
from tempest.common import custom_matchers
|
||||
from tempest.common.utils import data_utils
|
||||
|
@ -11,6 +11,7 @@
|
||||
# under the License.
|
||||
|
||||
import os.path
|
||||
|
||||
import yaml
|
||||
|
||||
from tempest import clients
|
||||
|
@ -12,6 +12,7 @@
|
||||
|
||||
|
||||
import logging
|
||||
|
||||
import netaddr
|
||||
|
||||
from tempest.api.orchestration import base
|
||||
|
@ -14,6 +14,7 @@
|
||||
# limitations under the License.
|
||||
|
||||
import logging
|
||||
|
||||
from six import moves
|
||||
from testtools import matchers
|
||||
|
||||
|
@ -15,11 +15,12 @@
|
||||
# under the License.
|
||||
import operator
|
||||
|
||||
from testtools import matchers
|
||||
|
||||
from tempest.api.volume import base
|
||||
from tempest.common.utils import data_utils
|
||||
from tempest.openstack.common import log as logging
|
||||
from tempest import test
|
||||
from testtools import matchers
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
|
@ -13,8 +13,10 @@
|
||||
# under the License.
|
||||
|
||||
import copy
|
||||
|
||||
from tempest.api_schema.response.compute import hypervisors
|
||||
|
||||
|
||||
hypervisors_servers = copy.deepcopy(hypervisors.common_hypervisors_detail)
|
||||
|
||||
# Defining extra attributes for V3 show hypervisor schema
|
||||
|
@ -13,8 +13,10 @@
|
||||
# under the License.
|
||||
|
||||
import copy
|
||||
|
||||
from tempest.api_schema.response.compute import hypervisors
|
||||
|
||||
|
||||
list_hypervisors_detail = copy.deepcopy(
|
||||
hypervisors.common_list_hypervisors_detail)
|
||||
# Defining extra attributes for V3 show hypervisor schema
|
||||
|
@ -55,9 +55,7 @@ addresses_v3['patternProperties']['^[a-zA-Z0-9-_.]+$']['items'][
|
||||
'mac_addr': {'type': 'string'}
|
||||
})
|
||||
addresses_v3['patternProperties']['^[a-zA-Z0-9-_.]+$']['items'][
|
||||
'required'].extend(
|
||||
['type', 'mac_addr']
|
||||
)
|
||||
'required'].extend(['type', 'mac_addr'])
|
||||
|
||||
update_server = copy.deepcopy(servers.base_update_get_server)
|
||||
update_server['response_body']['properties']['server']['properties'].update({
|
||||
|
@ -18,16 +18,17 @@ import copy
|
||||
import datetime
|
||||
import exceptions
|
||||
import re
|
||||
import six
|
||||
import urlparse
|
||||
|
||||
import six
|
||||
|
||||
from tempest import config
|
||||
from tempest.openstack.common import log as logging
|
||||
from tempest.services.identity.json import identity_client as json_id
|
||||
from tempest.services.identity.v3.json import identity_client as json_v3id
|
||||
from tempest.services.identity.v3.xml import identity_client as xml_v3id
|
||||
from tempest.services.identity.xml import identity_client as xml_id
|
||||
|
||||
from tempest.openstack.common import log as logging
|
||||
|
||||
CONF = config.CONF
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
@ -15,6 +15,7 @@
|
||||
|
||||
import logging
|
||||
import re
|
||||
|
||||
import testtools
|
||||
|
||||
from tempest import cli
|
||||
|
@ -12,6 +12,7 @@
|
||||
|
||||
import json
|
||||
import os
|
||||
|
||||
import yaml
|
||||
|
||||
import tempest.cli
|
||||
|
@ -19,13 +19,13 @@ resources in a declarative way.
|
||||
|
||||
"""
|
||||
|
||||
import argparse
|
||||
import logging
|
||||
import os
|
||||
import sys
|
||||
import unittest
|
||||
import yaml
|
||||
|
||||
import argparse
|
||||
import yaml
|
||||
|
||||
import tempest.auth
|
||||
from tempest import config
|
||||
|
@ -18,13 +18,14 @@ import argparse
|
||||
import inspect
|
||||
import json
|
||||
import sys
|
||||
from testtools import testsuite
|
||||
try:
|
||||
from unittest import loader
|
||||
except ImportError:
|
||||
# unittest in python 2.6 does not contain loader, so uses unittest2
|
||||
from unittest2 import loader
|
||||
|
||||
from testtools import testsuite
|
||||
|
||||
from tempest.openstack.common import log as logging
|
||||
from tempest.stress import driver
|
||||
|
||||
|
@ -14,6 +14,7 @@
|
||||
|
||||
import hashlib
|
||||
import os
|
||||
|
||||
import yaml
|
||||
|
||||
from tempest import auth
|
||||
|
@ -12,6 +12,7 @@
|
||||
# limitations under the License.
|
||||
|
||||
import abc
|
||||
|
||||
import six
|
||||
|
||||
from tempest import config
|
||||
|
@ -14,7 +14,6 @@
|
||||
|
||||
from tempest.common import commands
|
||||
from tempest import config
|
||||
|
||||
from tempest.openstack.common import log as logging
|
||||
|
||||
CONF = config.CONF
|
||||
|
@ -19,15 +19,17 @@ import copy
|
||||
import hashlib
|
||||
import httplib
|
||||
import json
|
||||
import OpenSSL
|
||||
import posixpath
|
||||
import re
|
||||
from six import moves
|
||||
import socket
|
||||
import StringIO
|
||||
import struct
|
||||
import urlparse
|
||||
|
||||
|
||||
import OpenSSL
|
||||
from six import moves
|
||||
|
||||
from tempest import exceptions as exc
|
||||
from tempest.openstack.common import log as logging
|
||||
|
||||
|
@ -16,12 +16,12 @@
|
||||
|
||||
import collections
|
||||
import json
|
||||
from lxml import etree
|
||||
import re
|
||||
import string
|
||||
import time
|
||||
|
||||
import jsonschema
|
||||
from lxml import etree
|
||||
|
||||
from tempest.common import http
|
||||
from tempest.common.utils import misc as misc_utils
|
||||
|
@ -16,11 +16,12 @@
|
||||
|
||||
import cStringIO
|
||||
import select
|
||||
import six
|
||||
import socket
|
||||
import time
|
||||
import warnings
|
||||
|
||||
import six
|
||||
|
||||
from tempest import exceptions
|
||||
from tempest.openstack.common import log as logging
|
||||
|
||||
|
@ -11,9 +11,10 @@
|
||||
# under the License.
|
||||
|
||||
import re
|
||||
import six
|
||||
import time
|
||||
|
||||
import six
|
||||
|
||||
from tempest.common import ssh
|
||||
from tempest import config
|
||||
from tempest import exceptions
|
||||
|
@ -17,7 +17,6 @@
|
||||
import logging
|
||||
import os
|
||||
import re
|
||||
import six
|
||||
import subprocess
|
||||
import time
|
||||
|
||||
@ -27,6 +26,7 @@ from heatclient import exc as heat_exceptions
|
||||
import netaddr
|
||||
from neutronclient.common import exceptions as exc
|
||||
from novaclient import exceptions as nova_exceptions
|
||||
import six
|
||||
|
||||
from tempest.api.network import common as net_common
|
||||
from tempest import auth
|
||||
|
@ -10,9 +10,10 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
import heatclient.exc as heat_exceptions
|
||||
import time
|
||||
|
||||
import heatclient.exc as heat_exceptions
|
||||
|
||||
from tempest import config
|
||||
from tempest.scenario import manager
|
||||
from tempest import test
|
||||
|
@ -15,6 +15,7 @@
|
||||
# under the License.
|
||||
import collections
|
||||
import re
|
||||
|
||||
import testtools
|
||||
|
||||
from tempest.api.network import common as net_common
|
||||
|
@ -13,9 +13,10 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from lxml import etree
|
||||
import urllib
|
||||
|
||||
from lxml import etree
|
||||
|
||||
from tempest.common import rest_client
|
||||
from tempest.common import xml_utils
|
||||
from tempest import config
|
||||
|
@ -15,6 +15,7 @@
|
||||
import urllib
|
||||
|
||||
from lxml import etree
|
||||
|
||||
from tempest.common import rest_client
|
||||
from tempest.common import xml_utils
|
||||
from tempest import config
|
||||
|
@ -13,9 +13,10 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from lxml import etree
|
||||
import urllib
|
||||
|
||||
from lxml import etree
|
||||
|
||||
from tempest.common import rest_client
|
||||
from tempest.common import xml_utils
|
||||
from tempest import config
|
||||
|
@ -10,9 +10,10 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from lxml import etree
|
||||
import xml.etree.ElementTree as ET
|
||||
|
||||
from lxml import etree
|
||||
|
||||
from tempest.common import rest_client
|
||||
from tempest.common import xml_utils as common
|
||||
from tempest.services.network import network_client_base as client_base
|
||||
|
@ -15,12 +15,12 @@
|
||||
|
||||
import json
|
||||
import urllib
|
||||
from xml.etree import ElementTree as etree
|
||||
|
||||
from tempest.common import http
|
||||
from tempest.common import rest_client
|
||||
from tempest import config
|
||||
from tempest import exceptions
|
||||
from xml.etree import ElementTree as etree
|
||||
|
||||
CONF = config.CONF
|
||||
|
||||
|
@ -15,10 +15,10 @@
|
||||
|
||||
import json
|
||||
import urllib
|
||||
from xml.etree import ElementTree as etree
|
||||
|
||||
from tempest.common import rest_client
|
||||
from tempest import config
|
||||
from xml.etree import ElementTree as etree
|
||||
|
||||
CONF = config.CONF
|
||||
|
||||
|
@ -14,9 +14,10 @@
|
||||
# under the License.
|
||||
|
||||
import abc
|
||||
import six
|
||||
import urllib
|
||||
|
||||
import six
|
||||
|
||||
from tempest import config
|
||||
|
||||
CONF = config.CONF
|
||||
|
@ -16,10 +16,9 @@
|
||||
|
||||
import urllib
|
||||
|
||||
from tempest.openstack.common import jsonutils
|
||||
|
||||
from tempest.common import rest_client
|
||||
from tempest import config
|
||||
from tempest.openstack.common import jsonutils
|
||||
|
||||
CONF = config.CONF
|
||||
|
||||
|
@ -15,6 +15,7 @@
|
||||
# under the License.
|
||||
|
||||
import ast
|
||||
|
||||
from lxml import etree
|
||||
|
||||
from tempest.common import xml_utils as xml
|
||||
|
@ -15,9 +15,9 @@
|
||||
|
||||
import time
|
||||
import urllib
|
||||
from xml.sax import saxutils
|
||||
|
||||
from lxml import etree
|
||||
from xml.sax import saxutils
|
||||
|
||||
from tempest.common import rest_client
|
||||
from tempest.common import xml_utils as common
|
||||
|
@ -13,7 +13,6 @@
|
||||
# under the License.
|
||||
|
||||
import mock
|
||||
|
||||
from oslotest import base
|
||||
from oslotest import moxstubout
|
||||
|
||||
|
@ -13,6 +13,7 @@
|
||||
# under the License.
|
||||
|
||||
import copy
|
||||
|
||||
import httplib2
|
||||
|
||||
|
||||
|
@ -13,9 +13,9 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
import json
|
||||
|
||||
import httplib2
|
||||
import json
|
||||
|
||||
|
||||
TOKEN = "fake_token"
|
||||
|
@ -12,9 +12,10 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
import mock
|
||||
import subprocess
|
||||
|
||||
import mock
|
||||
|
||||
from tempest.common import commands
|
||||
from tempest.tests import base
|
||||
|
||||
|
@ -15,9 +15,10 @@
|
||||
|
||||
import httplib
|
||||
import json
|
||||
import socket
|
||||
|
||||
import mock
|
||||
import six
|
||||
import socket
|
||||
|
||||
from tempest.common import glance_http
|
||||
from tempest import exceptions
|
||||
|
@ -12,9 +12,9 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
import httplib2
|
||||
import json
|
||||
|
||||
import httplib2
|
||||
from oslotest import mockpatch
|
||||
|
||||
from tempest.common import rest_client
|
||||
|
@ -335,9 +335,11 @@ class TestTenantIsolation(base.TestCase):
|
||||
remove_router_interface_mock = self.patch(
|
||||
'tempest.services.network.json.network_client.NetworkClientJSON.'
|
||||
'remove_router_interface_with_subnet_id')
|
||||
return_values = ({'status': 200}, {'ports': []})
|
||||
port_list_mock = mock.patch.object(iso_creds.network_admin_client,
|
||||
'list_ports', return_value=(
|
||||
{'status': 200}, {'ports': []}))
|
||||
'list_ports',
|
||||
return_value=return_values)
|
||||
|
||||
port_list_mock.start()
|
||||
iso_creds.clear_isolated_creds()
|
||||
# Verify remove router interface calls
|
||||
|
2
tempest/thirdparty/boto/test.py
vendored
2
tempest/thirdparty/boto/test.py
vendored
@ -17,7 +17,6 @@ import contextlib
|
||||
import logging as orig_logging
|
||||
import os
|
||||
import re
|
||||
import six
|
||||
import urlparse
|
||||
|
||||
import boto
|
||||
@ -25,6 +24,7 @@ from boto import ec2
|
||||
from boto import exception
|
||||
from boto import s3
|
||||
import keystoneclient.exceptions
|
||||
import six
|
||||
|
||||
import tempest.clients
|
||||
from tempest.common.utils import file_utils
|
||||
|
@ -22,6 +22,7 @@ import re
|
||||
import StringIO
|
||||
import sys
|
||||
import urllib2
|
||||
|
||||
import yaml
|
||||
|
||||
|
||||
|
@ -42,10 +42,10 @@
|
||||
"""Display a subunit stream through a colorized unittest test runner."""
|
||||
|
||||
import heapq
|
||||
import subunit
|
||||
import sys
|
||||
import unittest
|
||||
|
||||
import subunit
|
||||
import testtools
|
||||
|
||||
|
||||
|
@ -16,12 +16,13 @@
|
||||
# under the License.
|
||||
|
||||
import gzip
|
||||
import pprint
|
||||
import re
|
||||
import StringIO
|
||||
import sys
|
||||
import urllib2
|
||||
|
||||
import pprint
|
||||
|
||||
pp = pprint.PrettyPrinter()
|
||||
|
||||
NOVA_TIMESTAMP = r"\d\d\d\d-\d\d-\d\d \d\d:\d\d:\d\d\.\d\d\d"
|
||||
|
5
tox.ini
5
tox.ini
@ -109,7 +109,8 @@ import_exceptions = tempest.services
|
||||
[flake8]
|
||||
# E125 is a won't fix until https://github.com/jcrocholl/pep8/issues/126 is resolved. For further detail see https://review.openstack.org/#/c/36788/
|
||||
# H402 skipped because some docstrings aren't sentences
|
||||
# Skipped because of new hacking 0.9: H407,H405,H904,H305,E123,H307,E122,E129,E128
|
||||
ignore = E125,H402,H404,H407,H405,H904,H305,E123,H307,E122,E129,E128
|
||||
# E123 skipped because it is ignored by default in the default pep8
|
||||
# Skipped because of new hacking 0.9: H405,H904,E129,E128
|
||||
ignore = E125,H402,E123,H404,H405,H904,E129,E128
|
||||
show-source = True
|
||||
exclude = .git,.venv,.tox,dist,doc,openstack,*egg
|
||||
|
Loading…
Reference in New Issue
Block a user