Update hacking

This Patch updates hacking from
<0.10,>=0.9.2 to <0.11,>=0.10.2,
and fixes W292, H238, H105 errors.

W292 no newline at end of file
H238 old style class declaration, use new style (inherit from `object`)
H105 Don't use author tags

Change-Id: Ic2f9fc8f5adf62192f0cf2e775e095943ed4c070
Related-Bug: 1515930
changes/74/262874/2
Martin Oemke 7 years ago
parent 21ea0312ac
commit 216082b439
  1. 2
      tacker/agent/linux/daemon.py
  2. 2
      tacker/agent/linux/external_process.py
  3. 2
      tacker/agent/linux/utils.py
  4. 1
      tacker/api/v1/resource_helper.py
  5. 1
      tacker/common/driver_manager.py
  6. 1
      tacker/common/log.py
  7. 2
      tacker/db/migration/__init__.py
  8. 2
      tacker/db/migration/alembic_migrations/env.py
  9. 2
      tacker/db/migration/alembic_migrations/versions/1c6b0d82afcd_servicevm_framework.py
  10. 2
      tacker/db/migration/cli.py
  11. 2
      tacker/db/vm/proxy_db.py
  12. 2
      tacker/db/vm/vm_db.py
  13. 3
      tacker/tests/tools.py
  14. 2
      tacker/tests/unit/database_stubs.py
  15. 2
      tacker/tests/unit/extensions/extendedattribute.py
  16. 3
      tacker/tests/unit/extensions/extensionattribute.py
  17. 2
      tacker/tests/unit/services/vm/test_servicevm_extension.py
  18. 3
      tacker/tests/unit/test_api_api_common.py
  19. 2
      tacker/tests/unit/test_api_v2.py
  20. 2
      tacker/tests/unit/test_api_v2_extension.py
  21. 3
      tacker/tests/unit/test_api_v2_resource.py
  22. 4
      tacker/tests/unit/test_wsgi.py
  23. 2
      tacker/tests/utils.py
  24. 2
      tacker/vm/constants.py
  25. 2
      tacker/vm/drivers/abstract_driver.py
  26. 2
      tacker/vm/drivers/heat/heat.py
  27. 3
      tacker/vm/drivers/noop.py
  28. 2
      tacker/vm/drivers/nova/nova.py
  29. 2
      tacker/vm/hosting_device_scheduler.py
  30. 2
      tacker/vm/mgmt_drivers/abstract_driver.py
  31. 2
      tacker/vm/mgmt_drivers/constants.py
  32. 2
      tacker/vm/mgmt_drivers/noop.py
  33. 2
      tacker/vm/mgmt_drivers/openwrt/openwrt.py
  34. 2
      tacker/vm/monitor.py
  35. 2
      tacker/vm/plugin.py
  36. 2
      test-requirements.txt

@ -13,8 +13,6 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
# @author: Mark McClain, DreamHost
import atexit
import fcntl

@ -13,8 +13,6 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
# @author: Mark McClain, DreamHost
import os

@ -14,8 +14,6 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
# @author: Juliano Martinez, Locaweb.
import fcntl
import os

@ -12,7 +12,6 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
# @author: Paul Michali Cisco Systems, Inc.
from oslo_config import cfg

@ -18,7 +18,6 @@
# License for the specific language governing permissions and limitations
# under the License.
#
# @author: Isaku Yamahata, Intel Corporation.
import logging as log

@ -1,6 +1,5 @@
# Copyright (C) 2013 eNovance SAS <licensing@enovance.com>
#
# Author: Sylvain Afchain <sylvain.afchain@enovance.com>
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain

@ -11,8 +11,6 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
# @author: Mark McClain, DreamHost
from alembic import op
import sqlalchemy as sa

@ -11,8 +11,6 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
# @author: Mark McClain, DreamHost
from logging import config as logging_config

@ -16,8 +16,6 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
# @author: Isaku Yamahata, Intel Corporation.
"""add tables for servicevm framework

@ -11,8 +11,6 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
# @author: Mark McClain, DreamHost
import os

@ -15,8 +15,6 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
# @author: Isaku Yamahata, Intel Corporation.
import sqlalchemy as sa

@ -17,8 +17,6 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
# @author: Isaku Yamahata, Intel Corporation.
import uuid

@ -12,9 +12,6 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
# @author: Akihiro Motoki, NEC Corporation
"""setup_mock_calls and verify_mock_calls are convenient methods
to setup a sequence of mock calls.

@ -14,8 +14,6 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
# @author: Rohit Agarwalla, Cisco Systems, Inc.
"""stubs.py provides interface methods for the database test cases"""

@ -13,8 +13,6 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
# @author: Kaiwei Fan, VMware, Inc
from tacker.api import extensions

@ -14,9 +14,6 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
# @author: Kaiwei Fan, VMware, Inc
#
import abc

@ -17,8 +17,6 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
# @author: Isaku Yamahata, Intel Corporation.
import copy
import uuid

@ -14,9 +14,6 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
# @author: Zhongyue Luo, Intel Corporation.
#
from testtools import matchers
from webob import exc

@ -1350,7 +1350,7 @@ class ExtensionTestCase(base.BaseTestCase):
self.assertNotIn('v2attrs:something_else', net)
class TestSubresourcePlugin():
class TestSubresourcePlugin(object):
def get_network_dummies(self, context, network_id,
filters=None, fields=None):
return []

@ -15,8 +15,6 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
# @author: Isaku Yamahata, Intel Corporation.
import uuid

@ -14,9 +14,6 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
# @author: Zhongyue Luo, Intel Corporation.
#
import mock
from webob import exc

@ -783,7 +783,7 @@ class ResourceTest(base.BaseTestCase):
def my_fault_body_function():
return 'off'
class FakeRequest():
class FakeRequest(object):
def __init__(self):
self.url = 'http://where.no'
self.environ = 'environ'
@ -823,7 +823,7 @@ class ResourceTest(base.BaseTestCase):
def my_fault_body_function():
return 'off'
class FakeRequest():
class FakeRequest(object):
def __init__(self):
self.url = 'http://where.no'
self.environ = 'environ'

@ -19,4 +19,4 @@ def read_file(input_file):
yaml_file = os.path.abspath(os.path.join(os.path.dirname(__file__),
'etc/samples/' + str(input_file)))
with open(yaml_file, 'r') as f:
return f.read()
return f.read()

@ -17,8 +17,6 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
# @author: Isaku Yamahata, Intel Corporation.
# sevice type
SVC_TYPE_ROUTER = 'router'

@ -17,8 +17,6 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
# @author: Isaku Yamahata, Intel Corporation.
import abc

@ -447,7 +447,7 @@ class DeviceHeat(abstract_driver.DeviceAbstractDriver):
raise NotImplementedError()
class HeatClient:
class HeatClient(object):
def __init__(self, context, password=None):
# context, password are unused
self.stacks = clients.OpenstackClients().heat.stacks

@ -17,8 +17,7 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
# @author: Isaku Yamahata, Intel Corporation.
# TODO(yamahata): once unittests are impletemted, move this there
import uuid

@ -17,8 +17,6 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
# @author: Isaku Yamahata, Intel Corporation.
import time

@ -17,8 +17,6 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
# @author: Isaku Yamahata, Intel Corporation.
import random

@ -17,8 +17,6 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
# @author: Isaku Yamahata, Intel Corporation.
import abc

@ -17,8 +17,6 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
# @author: Isaku Yamahata, Intel Corporation.
# key
KEY_ACTION = 'action'

@ -17,8 +17,6 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
# @author: Isaku Yamahata, Intel Corporation.
from tacker.openstack.common import log as logging
from tacker.vm.mgmt_drivers import abstract_driver

@ -15,8 +15,6 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
# @author: Isaku Yamahata, Intel Corporation.
from oslo_config import cfg
import yaml

@ -15,8 +15,6 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
# @author: Isaku Yamahata, Intel Corporation.
import abc
import inspect

@ -17,8 +17,6 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
# @author: Isaku Yamahata, Intel Corporation.
import copy
import inspect

@ -10,7 +10,7 @@ coverage>=3.6
discover
doc8 # Apache-2.0
fixtures>=1.3.1
hacking<0.10,>=0.9.2
hacking<0.11,>=0.10.2
mock>=1.2
python-subunit>=0.0.18
ordereddict

Loading…
Cancel
Save