Fix flake8 E405 errors

Fix E405 error and start enforcing it.

Trivialfix

Change-Id: I6a55102d03bbcdd5c0c3a5cc75aea0ca37578117
This commit is contained in:
Brian Haley 2018-10-09 20:00:27 -04:00
parent 8aaa73ff53
commit aee61ac85e
7 changed files with 15 additions and 11 deletions

View File

@ -82,7 +82,9 @@ class NetworksTestDHCPv6(base.BaseNetworkTest):
@decorators.idempotent_id('98244d88-d990-4570-91d4-6b25d70d08af')
def test_dhcp_stateful_fixedips_outrange(self):
"""When port gets IP address from fixed IP range it
"""Test DHCP Stateful fixed IPs out of range
When port gets IP address from fixed IP range it
shall be checked if it's from subnets range.
"""
kwargs = {'ipv6_ra_mode': 'dhcpv6-stateful',

View File

@ -146,8 +146,7 @@ class Client(ssh.Client):
_get_ssh_connection = connect
def close(self):
"""Closes connection to SSH server and cleanup resources.
"""
"""Closes connection to SSH server and cleanup resources."""
client = self._client
if client is not None:
client.close()

View File

@ -95,7 +95,9 @@ class FloatingIpTestCasesAdmin(base.BaseTempestTestCase):
@decorators.idempotent_id('6bba729b-3fb6-494b-9e1e-82bbd89a1045')
def test_two_vms_fips(self):
"""This test verifies the ability of two instances
"""Test two VMs floating IPs
This test verifies the ability of two instances
that were created in the same compute node and same availability zone
to reach each other.
"""

View File

@ -40,6 +40,7 @@ class BaseTempestTestCase(base_api.BaseNetworkTest):
def create_server(self, flavor_ref, image_ref, key_name, networks,
**kwargs):
"""Create a server using tempest lib
All the parameters are the ones used in Compute API
* - Kwargs that require admin privileges
@ -134,8 +135,7 @@ class BaseTempestTestCase(base_api.BaseNetworkTest):
@classmethod
def create_pingable_secgroup_rule(cls, secgroup_id=None,
client=None):
"""This rule is intended to permit inbound ping
"""
"""This rule is intended to permit inbound ping"""
rule_list = [{'protocol': 'icmp',
'direction': 'ingress',

View File

@ -49,8 +49,7 @@ def _try_connect(host_ip, port):
def _connect_socket(host, port):
"""Try to initiate a connection to a host using an ip address
and a port.
"""Try to initiate a connection to a host using an ip address and a port.
Trying couple of times until a timeout is reached in case the listening
host is not ready yet.

View File

@ -43,6 +43,7 @@ class NetworkSecGroupTest(base.BaseTempestTestCase):
def create_vm_testing_sec_grp(self, num_servers=2, security_groups=None,
ports=None):
"""Create instance for security group testing
:param num_servers (int): number of servers to spawn
:param security_groups (list): list of security groups
:param ports* (list): list of ports
@ -260,7 +261,9 @@ class NetworkSecGroupTest(base.BaseTempestTestCase):
@decorators.idempotent_id('f07d0159-8f9e-4faa-87f5-a869ab0ad488')
def test_multiple_ports_secgroup_inheritance(self):
"""This test creates two ports with security groups, then
"""Test multiple port security group inheritance
This test creates two ports with security groups, then
boots two instances and verify that the security group was
inherited properly and enforced in these instances.
"""

View File

@ -56,9 +56,8 @@ commands = oslo_debug_helper -t neutron_tempest_plugin/ {posargs}
# E126 continuation line over-indented for hanging indent
# E128 continuation line under-indented for visual indent
# E129 visually indented line with same indent as next logical line
# H405 multi line docstring summary not separated with an empty line
# N530 direct neutron imports not allowed
ignore = E125,E126,E128,E129,H405,N530
ignore = E125,E126,E128,E129,N530
# H106: Don't put vim configuration in source files
# H203: Use assertIs(Not)None to check for None
# H904: Delay string interpolations at logging calls