Merge "Enabled hacking checks H305 and H307"
This commit is contained in:
commit
da69456399
@ -41,7 +41,6 @@ if os.path.exists(os.path.join(possible_topdir, "manila", "__init__.py")):
|
||||
|
||||
from manila.openstack.common import gettextutils
|
||||
gettextutils.install('manila')
|
||||
|
||||
from manila.common import config # Need to register global_opts
|
||||
from manila.openstack.common import log as logging
|
||||
from manila import service
|
||||
|
@ -38,7 +38,6 @@ if os.path.exists(os.path.join(possible_topdir, "manila", "__init__.py")):
|
||||
|
||||
from manila.openstack.common import gettextutils
|
||||
gettextutils.install('manila')
|
||||
|
||||
from manila.common import config # Need to register global_opts
|
||||
from manila.openstack.common import log as logging
|
||||
from manila import service
|
||||
|
@ -39,7 +39,6 @@ if os.path.exists(os.path.join(POSSIBLE_TOPDIR, 'manila', '__init__.py')):
|
||||
|
||||
from manila.openstack.common import gettextutils
|
||||
gettextutils.install('manila')
|
||||
|
||||
from manila.common import config # Need to register global_opts
|
||||
from manila import context
|
||||
from manila import exception
|
||||
|
@ -37,7 +37,6 @@ if os.path.exists(os.path.join(possible_topdir, 'manila', '__init__.py')):
|
||||
|
||||
from manila.openstack.common import gettextutils
|
||||
gettextutils.install('manila')
|
||||
|
||||
from manila.common import config # Need to register global_opts
|
||||
from manila.openstack.common import log as logging
|
||||
from manila import service
|
||||
|
@ -36,7 +36,6 @@ if os.path.exists(os.path.join(possible_topdir, 'manila', '__init__.py')):
|
||||
|
||||
from manila.openstack.common import gettextutils
|
||||
gettextutils.install('manila')
|
||||
|
||||
from manila.common import config # Need to register global_opts
|
||||
from manila.openstack.common import log as logging
|
||||
from manila import service
|
||||
|
@ -13,7 +13,7 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
import testtools
|
||||
import testtools # noqa
|
||||
|
||||
from tempest.api.share import base
|
||||
from tempest import clients_share as clients
|
||||
|
@ -13,7 +13,7 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
import testtools
|
||||
import testtools # noqa
|
||||
|
||||
from tempest.api.share import base
|
||||
from tempest import exceptions
|
||||
|
@ -13,7 +13,7 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
import testtools
|
||||
import testtools # noqa
|
||||
|
||||
from tempest.api.share import base
|
||||
from tempest import config_share as config
|
||||
|
@ -13,7 +13,7 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
import testtools
|
||||
import testtools # noqa
|
||||
|
||||
from tempest.api.share import base
|
||||
from tempest import config_share as config
|
||||
|
@ -17,7 +17,7 @@ from __future__ import print_function
|
||||
|
||||
from oslo.config import cfg
|
||||
|
||||
from tempest import config
|
||||
from tempest import config # noqa
|
||||
|
||||
service_available_group = cfg.OptGroup(name="service_available",
|
||||
title="Available OpenStack Services")
|
||||
|
@ -17,7 +17,6 @@
|
||||
# under the License.
|
||||
|
||||
from oslo.config import cfg
|
||||
|
||||
import paste.urlmap
|
||||
|
||||
|
||||
|
@ -21,12 +21,11 @@ It can't be called 'extensions' because that causes namespacing problems.
|
||||
|
||||
"""
|
||||
|
||||
from manila.api import extensions
|
||||
|
||||
from manila.openstack.common import log as logging
|
||||
|
||||
from oslo.config import cfg
|
||||
|
||||
from manila.api import extensions
|
||||
from manila.openstack.common import log as logging
|
||||
|
||||
CONF = cfg.CONF
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
|
@ -16,6 +16,7 @@
|
||||
# under the License.
|
||||
|
||||
import urlparse
|
||||
|
||||
import webob
|
||||
|
||||
from manila.api import extensions
|
||||
|
@ -13,6 +13,7 @@
|
||||
# under the License.
|
||||
|
||||
import re
|
||||
|
||||
import webob
|
||||
|
||||
from manila.api import extensions
|
||||
|
@ -27,7 +27,6 @@ import webob.exc
|
||||
from manila.api.openstack import wsgi
|
||||
from manila import context
|
||||
from manila.openstack.common import jsonutils
|
||||
|
||||
from manila.openstack.common import log as logging
|
||||
from manila import wsgi as base_wsgi
|
||||
|
||||
|
@ -15,10 +15,11 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
import paste.urlmap
|
||||
import re
|
||||
import urllib2
|
||||
|
||||
import paste.urlmap
|
||||
|
||||
from manila.api.openstack import wsgi
|
||||
from manila.openstack.common import log as logging
|
||||
|
||||
|
@ -24,8 +24,6 @@ WSGI middleware for OpenStack Share API.
|
||||
from manila.api import extensions
|
||||
import manila.api.openstack
|
||||
from manila.api.v1 import limits
|
||||
from manila.api import versions
|
||||
|
||||
from manila.api.v1 import security_service
|
||||
from manila.api.v1 import share_metadata
|
||||
from manila.api.v1 import share_networks
|
||||
@ -33,7 +31,7 @@ from manila.api.v1 import share_servers
|
||||
from manila.api.v1 import share_snapshots
|
||||
from manila.api.v1 import shares
|
||||
from manila.api.v1 import volume_types
|
||||
|
||||
from manila.api import versions
|
||||
from manila.openstack.common import log as logging
|
||||
|
||||
|
||||
|
@ -16,12 +16,12 @@
|
||||
# under the License.
|
||||
|
||||
import webob
|
||||
from webob import exc
|
||||
|
||||
from manila.api import common
|
||||
from manila.api.openstack import wsgi
|
||||
from manila import exception
|
||||
from manila import share
|
||||
from webob import exc
|
||||
|
||||
|
||||
class ShareMetadataController(object):
|
||||
|
@ -16,14 +16,14 @@
|
||||
# under the License.
|
||||
|
||||
import datetime
|
||||
|
||||
from lxml import etree
|
||||
from oslo.config import cfg
|
||||
|
||||
from manila.api.openstack import wsgi
|
||||
from manila.api.views import versions as views_versions
|
||||
from manila.api import xmlutil
|
||||
|
||||
from oslo.config import cfg
|
||||
|
||||
CONF = cfg.CONF
|
||||
|
||||
|
||||
|
@ -46,7 +46,6 @@ these objects be simple dictionaries.
|
||||
from oslo.config import cfg
|
||||
|
||||
from manila import exception
|
||||
|
||||
from manila import utils
|
||||
|
||||
db_opts = [
|
||||
|
@ -19,20 +19,16 @@
|
||||
import distutils.version as dist_version
|
||||
import os
|
||||
|
||||
import migrate
|
||||
from migrate.versioning import util as migrate_util
|
||||
from oslo.config import cfg
|
||||
import sqlalchemy
|
||||
|
||||
from manila.db import migration
|
||||
from manila.db.sqlalchemy.session import get_engine
|
||||
from manila import exception
|
||||
|
||||
from manila.openstack.common import log as logging
|
||||
|
||||
|
||||
import migrate
|
||||
from migrate.versioning import util as migrate_util
|
||||
import sqlalchemy
|
||||
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
|
||||
|
@ -16,9 +16,10 @@
|
||||
# under the License.
|
||||
import abc
|
||||
|
||||
import manila.openstack.common.importutils
|
||||
from oslo.config import cfg
|
||||
|
||||
import manila.openstack.common.importutils
|
||||
|
||||
network_opts = [
|
||||
cfg.StrOpt('network_api_class',
|
||||
default='manila.network.neutron.'
|
||||
|
@ -23,12 +23,11 @@ Chance (Random) Scheduler implementation
|
||||
|
||||
import random
|
||||
|
||||
from manila import exception
|
||||
|
||||
from manila.scheduler import driver
|
||||
|
||||
from oslo.config import cfg
|
||||
|
||||
from manila import exception
|
||||
from manila.scheduler import driver
|
||||
|
||||
CONF = cfg.CONF
|
||||
|
||||
|
||||
|
@ -24,7 +24,6 @@ Scheduler base class that all Schedulers should inherit from
|
||||
from oslo.config import cfg
|
||||
|
||||
from manila import db
|
||||
|
||||
from manila.openstack.common import importutils
|
||||
from manila.openstack.common import timeutils
|
||||
from manila.share import rpcapi as share_rpcapi
|
||||
|
@ -22,15 +22,14 @@ Weighing Functions.
|
||||
|
||||
import operator
|
||||
|
||||
from manila import exception
|
||||
from oslo.config import cfg
|
||||
|
||||
from manila import exception
|
||||
from manila.openstack.common import importutils
|
||||
from manila.openstack.common import log as logging
|
||||
from manila.scheduler import driver
|
||||
from manila.scheduler import scheduler_options
|
||||
|
||||
from oslo.config import cfg
|
||||
|
||||
CONF = cfg.CONF
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
|
@ -25,7 +25,6 @@ from oslo.config import cfg
|
||||
|
||||
from manila import db
|
||||
from manila import exception
|
||||
|
||||
from manila.scheduler import chance
|
||||
from manila.scheduler import driver
|
||||
from manila import utils
|
||||
|
@ -14,8 +14,8 @@
|
||||
# under the License.
|
||||
|
||||
"""Generic Driver for shares."""
|
||||
import ConfigParser
|
||||
|
||||
import ConfigParser
|
||||
import os
|
||||
import re
|
||||
import shutil
|
||||
|
@ -18,9 +18,10 @@ NetApp api for ONTAP and OnCommand DFM.
|
||||
Contains classes required to issue api calls to ONTAP and OnCommand DFM.
|
||||
"""
|
||||
|
||||
from lxml import etree
|
||||
import urllib2
|
||||
|
||||
from lxml import etree
|
||||
|
||||
from manila.openstack.common import log
|
||||
|
||||
|
||||
|
@ -15,12 +15,12 @@
|
||||
|
||||
"""Module for managing nova instances for share drivers."""
|
||||
|
||||
import netaddr
|
||||
import os
|
||||
import socket
|
||||
import threading
|
||||
import time
|
||||
|
||||
import netaddr
|
||||
from oslo.config import cfg
|
||||
|
||||
from manila.common import constants
|
||||
|
@ -30,7 +30,6 @@
|
||||
|
||||
import eventlet
|
||||
eventlet.monkey_patch()
|
||||
|
||||
from oslo.config import cfg
|
||||
|
||||
# See http://code.google.com/p/python-nose/issues/detail?id=373
|
||||
|
@ -15,9 +15,9 @@
|
||||
|
||||
import shutil
|
||||
import tempfile
|
||||
import webob
|
||||
|
||||
from oslo.config import cfg
|
||||
import webob
|
||||
|
||||
from manila import context
|
||||
from manila import db
|
||||
|
@ -16,7 +16,6 @@
|
||||
# under the License.
|
||||
|
||||
from lxml import etree
|
||||
|
||||
import mock
|
||||
import webob
|
||||
|
||||
|
@ -13,13 +13,13 @@
|
||||
# under the License.
|
||||
|
||||
import StringIO
|
||||
|
||||
from oslo.config import cfg
|
||||
import webob
|
||||
|
||||
from manila.api.middleware import sizelimit
|
||||
|
||||
from manila import test
|
||||
|
||||
from oslo.config import cfg
|
||||
|
||||
CONF = cfg.CONF
|
||||
MAX_REQUEST_BODY_SIZE = CONF.osapi_max_request_body_size
|
||||
|
@ -18,14 +18,13 @@
|
||||
|
||||
import iso8601
|
||||
from lxml import etree
|
||||
from oslo.config import cfg
|
||||
import webob
|
||||
|
||||
from manila.api.v1 import router
|
||||
from manila.api import xmlutil
|
||||
|
||||
from manila.openstack.common import jsonutils
|
||||
from manila import test
|
||||
from oslo.config import cfg
|
||||
|
||||
CONF = cfg.CONF
|
||||
NS = "{http://docs.openstack.org/common/api/v1.0}"
|
||||
|
@ -13,15 +13,14 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from oslo.config import cfg
|
||||
|
||||
from manila.api.openstack import wsgi
|
||||
from manila.api.v1 import router
|
||||
from manila.api import versions
|
||||
|
||||
from manila.openstack.common import log as logging
|
||||
from manila import test
|
||||
from manila.tests.api import fakes
|
||||
from oslo.config import cfg
|
||||
|
||||
CONF = cfg.CONF
|
||||
|
||||
|
@ -13,14 +13,14 @@
|
||||
# under the License.
|
||||
|
||||
import mock
|
||||
from novaclient import exceptions as nova_exception
|
||||
from novaclient.v1_1 import servers as nova_servers
|
||||
|
||||
from manila.compute import nova
|
||||
from manila import context
|
||||
from manila import exception
|
||||
from manila import test
|
||||
from manila.volume import cinder
|
||||
from novaclient import exceptions as nova_exception
|
||||
from novaclient.v1_1 import servers as nova_servers
|
||||
|
||||
|
||||
class Volume(object):
|
||||
|
@ -19,6 +19,7 @@
|
||||
import re
|
||||
|
||||
from eventlet import greenthread
|
||||
|
||||
from manila import exception
|
||||
from manila.openstack.common import log as logging
|
||||
from manila import utils
|
||||
|
@ -15,10 +15,10 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from oslo.config import cfg
|
||||
|
||||
from manila.openstack.common import log as logging
|
||||
from manila.tests.integrated import integrated_helpers
|
||||
from oslo.config import cfg
|
||||
|
||||
|
||||
CONF = cfg.CONF
|
||||
|
@ -14,7 +14,6 @@
|
||||
# under the License.
|
||||
|
||||
import mock
|
||||
|
||||
from oslo.config import cfg
|
||||
|
||||
from manila import context
|
||||
|
@ -14,6 +14,7 @@
|
||||
# under the License.
|
||||
|
||||
import hashlib
|
||||
|
||||
import mock
|
||||
|
||||
from manila import context
|
||||
|
@ -15,13 +15,13 @@
|
||||
|
||||
"""Test of Policy Engine For Manila."""
|
||||
|
||||
import mock
|
||||
import os.path
|
||||
|
||||
import mock
|
||||
from oslo.config import cfg
|
||||
import six
|
||||
from six.moves.urllib import request as urlrequest
|
||||
|
||||
from oslo.config import cfg
|
||||
|
||||
from manila import context
|
||||
from manila import exception
|
||||
from manila.openstack.common import policy as common_policy
|
||||
|
@ -19,16 +19,15 @@ Tests for Share Code.
|
||||
|
||||
"""
|
||||
import mock
|
||||
from oslo.config import cfg
|
||||
|
||||
from manila import context
|
||||
from manila import db
|
||||
from manila import exception
|
||||
|
||||
from manila.openstack.common import importutils
|
||||
import manila.policy
|
||||
from manila.share import manager
|
||||
from manila import test
|
||||
from oslo.config import cfg
|
||||
|
||||
CONF = cfg.CONF
|
||||
|
||||
|
@ -15,9 +15,9 @@
|
||||
|
||||
"""Unit tests for the Generic driver module."""
|
||||
|
||||
import mock
|
||||
import os
|
||||
|
||||
import mock
|
||||
from oslo.config import cfg
|
||||
|
||||
from manila import compute
|
||||
|
@ -16,15 +16,16 @@
|
||||
# under the License.
|
||||
|
||||
import errno
|
||||
from mock import Mock
|
||||
from mock import patch
|
||||
import os
|
||||
import subprocess
|
||||
|
||||
from mock import Mock
|
||||
from mock import patch
|
||||
from oslo.config import cfg
|
||||
|
||||
from manila import context
|
||||
from manila.db.sqlalchemy import models
|
||||
from manila import exception
|
||||
|
||||
from manila.openstack.common import importutils
|
||||
from manila.openstack.common import log as logging
|
||||
from manila.share import configuration as config
|
||||
@ -33,8 +34,6 @@ from manila import test
|
||||
from manila.tests.db import fakes as db_fakes
|
||||
from manila.tests import fake_utils
|
||||
|
||||
from oslo.config import cfg
|
||||
|
||||
|
||||
CONF = cfg.CONF
|
||||
|
||||
|
@ -14,9 +14,8 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
import mock
|
||||
|
||||
from cinderclient import exceptions as cinder_exception
|
||||
import mock
|
||||
|
||||
from manila import context
|
||||
from manila import exception
|
||||
|
@ -19,10 +19,10 @@ TestCase for MockProxy based tests and related classes.
|
||||
"""
|
||||
|
||||
import gzip
|
||||
import manila.test
|
||||
import os
|
||||
import pickle
|
||||
|
||||
import manila.test
|
||||
from manila.tests.windows import mockproxy
|
||||
|
||||
gen_test_mocks_key = 'MANILA_GENERATE_TEST_MOCKS'
|
||||
|
@ -25,9 +25,7 @@ import errno
|
||||
import functools
|
||||
import hashlib
|
||||
import inspect
|
||||
import netaddr
|
||||
import os
|
||||
import paramiko
|
||||
import pyclbr
|
||||
import random
|
||||
import re
|
||||
@ -43,10 +41,12 @@ from xml import sax
|
||||
from xml.sax import expatreader
|
||||
from xml.sax import saxutils
|
||||
|
||||
from oslo.config import cfg
|
||||
|
||||
from eventlet import event
|
||||
from eventlet import pools
|
||||
import netaddr
|
||||
from oslo.config import cfg
|
||||
import paramiko
|
||||
|
||||
from manila import exception
|
||||
from manila.openstack.common import excutils
|
||||
from manila.openstack.common import importutils
|
||||
|
4
tox.ini
4
tox.ini
@ -42,11 +42,9 @@ commands = bash tools/lintstack.sh
|
||||
[flake8]
|
||||
# TODO: These are not intentionally disabled, reenable when fixed:
|
||||
# H237: module is removed in Python 3
|
||||
# H305: imports not grouped correctly
|
||||
# H307: like imports should be grouped together
|
||||
# H405: multi line docstring summary not separated with an empty line
|
||||
# H501: Do not use locals() for string formatting
|
||||
# H904: Wrap long lines in parentheses instead of a backslash
|
||||
ignore = E12,E711,E712,H237,H302,H303,H304,H305,H307,H402,H404,H405,H501,H904,F
|
||||
ignore = E12,E711,E712,H237,H302,H303,H304,H402,H404,H405,H501,H904,F
|
||||
builtins = _
|
||||
exclude = .venv,.tox,dist,doc,openstack,*egg
|
||||
|
Loading…
Reference in New Issue
Block a user