fix new N402 errors

fix the N402 errors that have slipped in in the last 48 hrs since
starting this patch series.

fix an N401 error that our scanner current can't find because it
only looks for doc strings on classes and defs.

this is the xeno's paradox of patch series, but we're getting close.

Change-Id: I4a763bb4c812335d853eae05c72464f18ab93297
This commit is contained in:
Sean Dague
2013-01-09 16:00:36 -05:00
parent b2d9b99aaf
commit a938d073f7
2 changed files with 17 additions and 17 deletions

View File

@@ -56,7 +56,7 @@ QUEUE = Queue.Queue()
# They are split for stub-out.
def discovery(portal_address, portal_port):
"""Do iSCSI discovery on portal"""
"""Do iSCSI discovery on portal."""
utils.execute('iscsiadm',
'-m', 'discovery',
'-t', 'st',
@@ -66,7 +66,7 @@ def discovery(portal_address, portal_port):
def login_iscsi(portal_address, portal_port, target_iqn):
"""Login to an iSCSI target"""
"""Login to an iSCSI target."""
utils.execute('iscsiadm',
'-m', 'node',
'-p', '%s:%s' % (portal_address, portal_port),
@@ -79,7 +79,7 @@ def login_iscsi(portal_address, portal_port, target_iqn):
def logout_iscsi(portal_address, portal_port, target_iqn):
"""Logout from an iSCSI target"""
"""Logout from an iSCSI target."""
utils.execute('iscsiadm',
'-m', 'node',
'-p', '%s:%s' % (portal_address, portal_port),
@@ -90,7 +90,7 @@ def logout_iscsi(portal_address, portal_port, target_iqn):
def make_partitions(dev, root_mb, swap_mb):
"""Create partitions for root and swap on a disk device"""
"""Create partitions for root and swap on a disk device."""
commands = ['o,w',
'n,p,1,,+%dM,t,1,83,w' % root_mb,
'n,p,2,,+%dM,t,2,82,w' % swap_mb,
@@ -106,13 +106,13 @@ def make_partitions(dev, root_mb, swap_mb):
def is_block_device(dev):
"""Check whether a device is block or not"""
"""Check whether a device is block or not."""
s = os.stat(dev)
return stat.S_ISBLK(s.st_mode)
def dd(src, dst):
"""Execute dd from src to dst"""
"""Execute dd from src to dst."""
utils.execute('dd',
'if=%s' % src,
'of=%s' % dst,
@@ -122,7 +122,7 @@ def dd(src, dst):
def mkswap(dev, label='swap1'):
"""Execute mkswap on a device"""
"""Execute mkswap on a device."""
utils.execute('mkswap',
'-L', label,
dev,
@@ -131,7 +131,7 @@ def mkswap(dev, label='swap1'):
def block_uuid(dev):
"""Get UUID of a block device"""
"""Get UUID of a block device."""
out, _ = utils.execute('blkid', '-s', 'UUID', '-o', 'value', dev,
run_as_root=True,
check_exit_code=[0])
@@ -219,7 +219,7 @@ def deploy(address, port, iqn, lun, image_path, pxe_config_path,
class Worker(threading.Thread):
"""Thread that handles requests in queue"""
"""Thread that handles requests in queue."""
def __init__(self):
super(Worker, self).__init__()
@@ -250,7 +250,7 @@ class Worker(threading.Thread):
class BareMetalDeploy(object):
"""WSGI server for bare-metal deployment"""
"""WSGI server for bare-metal deployment."""
def __init__(self):
self.worker = Worker()

View File

@@ -540,7 +540,7 @@ class DbApiTestCase(test.TestCase):
self.assertEqual(expected, instance_faults)
def test_instance_action_start(self):
"""Create an instance action"""
"""Create an instance action."""
ctxt = context.get_admin_context()
uuid = str(stdlib_uuid.uuid4())
@@ -563,7 +563,7 @@ class DbApiTestCase(test.TestCase):
self.assertEqual(ctxt.project_id, actions[0]['project_id'])
def test_instance_action_finish(self):
"""Create an instance action"""
"""Create an instance action."""
ctxt = context.get_admin_context()
uuid = str(stdlib_uuid.uuid4())
@@ -593,7 +593,7 @@ class DbApiTestCase(test.TestCase):
self.assertEqual(ctxt.project_id, actions[0]['project_id'])
def test_instance_actions_get_by_instance(self):
"""Ensure we can get actions by UUID"""
"""Ensure we can get actions by UUID."""
ctxt1 = context.get_admin_context()
ctxt2 = context.get_admin_context()
uuid1 = str(stdlib_uuid.uuid4())
@@ -625,7 +625,7 @@ class DbApiTestCase(test.TestCase):
self.assertEqual('run_instance', actions[1]['action'])
def test_instance_action_get_by_instance_and_action(self):
"""Ensure we can get an action by instance UUID and action id"""
"""Ensure we can get an action by instance UUID and action id."""
ctxt1 = context.get_admin_context()
ctxt2 = context.get_admin_context()
uuid1 = str(stdlib_uuid.uuid4())
@@ -657,7 +657,7 @@ class DbApiTestCase(test.TestCase):
self.assertEqual(ctxt1.request_id, action['request_id'])
def test_instance_action_event_start(self):
"""Create an instance action event"""
"""Create an instance action event."""
ctxt = context.get_admin_context()
uuid = str(stdlib_uuid.uuid4())
@@ -683,7 +683,7 @@ class DbApiTestCase(test.TestCase):
self.assertEqual(start_time, events[0]['start_time'])
def test_instance_action_event_finish(self):
"""Finish an instance action event"""
"""Finish an instance action event."""
ctxt = context.get_admin_context()
uuid = str(stdlib_uuid.uuid4())
@@ -717,7 +717,7 @@ class DbApiTestCase(test.TestCase):
self.assertEqual(finish_time, events[0]['finish_time'])
def test_instance_action_event_get_by_id(self):
"""Get a specific instance action event"""
"""Get a specific instance action event."""
ctxt1 = context.get_admin_context()
ctxt2 = context.get_admin_context()
uuid1 = str(stdlib_uuid.uuid4())