Browse Source

Bump hacking to 3.0.0

The new version enables a lot of standard flake8 checks, so a few
fixes are required. W503 is disabled as it conflicts with W504
and the latter seems to be preferred nowadays.

Change-Id: I2d3abfd839b32e9ad17970ee586ce581b5ca57ad
tags/3.0.0
Riccardo Pittau 3 months ago
parent
commit
8d22d92bd8
5 changed files with 8 additions and 6 deletions
  1. +1
    -1
      lower-constraints.txt
  2. +1
    -1
      networking_generic_switch/devices/__init__.py
  3. +3
    -3
      tempest_plugin/tests/scenario/test_ngs_basic_ops.py
  4. +1
    -1
      test-requirements.txt
  5. +2
    -0
      tox.ini

+ 1
- 1
lower-constraints.txt View File

@@ -28,7 +28,7 @@ flake8-import-order==0.11
future==0.16.0
futurist==1.2.0
greenlet==0.4.10
hacking==0.12.0
hacking==3.0.0
httplib2==0.9.1
idna==2.6
iso8601==0.1.11


+ 1
- 1
networking_generic_switch/devices/__init__.py View File

@@ -92,7 +92,7 @@ class GenericSwitchDevice(object, metaclass=abc.ABCMeta):
try:
network_name_format.format(network_id='dummy',
segmentation_id='dummy')
except (IndexError, KeyError) as exc:
except (IndexError, KeyError):
raise gsw_exc.GenericSwitchNetworkNameFormatInvalid(
name_format=network_name_format)



+ 3
- 3
tempest_plugin/tests/scenario/test_ngs_basic_ops.py View File

@@ -105,9 +105,9 @@ class NGSBasicOpsBase(net_base.BaseAdminNetworkTest):

def _test_ngs_basic_ops(self, llc=None, port_name=None):
port = self.create_neutron_port(llc=llc, port_name=port_name)
net_tag = self.admin_networks_client.list_networks(
name=CONF.ngs.network_name
)['networks'][0]['provider:segmentation_id']
net_tag = (self.admin_networks_client.list_networks(
name=CONF.ngs.network_name)
['networks'][0]['provider:segmentation_id'])
ovs_tag = self.ovs_get_tag(port_name=port_name)
self.assertEqual(net_tag, ovs_tag)



+ 1
- 1
test-requirements.txt View File

@@ -10,7 +10,7 @@ stestr>=1.0.0 # Apache-2.0

# Code analysis/style check requirements
# hacking pins flake8 pep8 pyflakes mccabe
hacking>=1.0.0,<1.2.0 # Apache-2.0
hacking>=3.0.0,<3.1.0 # Apache-2.0
flake8-import-order==0.11 # LGPLv3
bashate>=0.5.1 # Apache-2.0
doc8>=0.6.0 # Apache-2.0


+ 2
- 0
tox.ini View File

@@ -70,6 +70,8 @@ commands = {posargs}
[flake8]
exclude = .venv,.git,.tox,dist,doc,*lib/python*,*egg,build
max-complexity=17
# [W503] Line break occurred before a binary operator. Conflicts with W504.
ignore = W503
import-order-style = pep8
application-import-names = networking_generic_switch
# [H106] Don't put vim configuration in source files.


Loading…
Cancel
Save