more pep8/pylint. all clean now

This commit is contained in:
Scott Moser 2013-03-07 17:13:05 -05:00
parent 149b2480dd
commit 626d07a00e
8 changed files with 15 additions and 13 deletions

View File

@ -56,7 +56,8 @@ class BootHookPartHandler(handlers.Handler):
util.write_file(filepath, contents, 0700)
return filepath
def handle_part(self, _data, ctype, filename, payload, _frequency):
def handle_part(self, _data, ctype, filename, # pylint: disable=W0221
payload, frequency): # pylint: disable=W0613
if ctype in handlers.CONTENT_SIGNALS:
return

View File

@ -46,7 +46,7 @@ class CloudConfigPartHandler(handlers.Handler):
handlers.type_from_starts_with("#cloud-config"),
]
def _write_cloud_config(self, buf):
def _write_cloud_config(self):
if not self.cloud_fn:
return
# Capture which files we merged from...
@ -107,12 +107,13 @@ class CloudConfigPartHandler(handlers.Handler):
self.cloud_buf = None
self.mergers = [DEF_MERGERS]
def handle_part(self, _data, ctype, filename, payload, _freq, headers):
def handle_part(self, _data, ctype, filename, # pylint: disable=W0221
payload, _frequency, headers): # pylint: disable=W0613
if ctype == handlers.CONTENT_START:
self._reset()
return
if ctype == handlers.CONTENT_END:
self._write_cloud_config(self.cloud_buf)
self._write_cloud_config()
self._reset()
return
try:

View File

@ -41,7 +41,8 @@ class ShellScriptPartHandler(handlers.Handler):
handlers.type_from_starts_with("#!"),
]
def handle_part(self, _data, ctype, filename, payload, _frequency):
def handle_part(self, _data, ctype, filename, # pylint: disable=W0221
payload, frequency): # pylint: disable=W0613
if ctype in handlers.CONTENT_SIGNALS:
# TODO(harlowja): maybe delete existing things here
return

View File

@ -42,7 +42,8 @@ class UpstartJobPartHandler(handlers.Handler):
handlers.type_from_starts_with("#upstart-job"),
]
def handle_part(self, _data, ctype, filename, payload, frequency):
def handle_part(self, _data, ctype, filename, # pylint: disable=W0221
payload, frequency):
if ctype in handlers.CONTENT_SIGNALS:
return

View File

@ -152,5 +152,3 @@ def construct(parsed_mergers):
for (attr, opts) in mergers_to_be:
mergers.append(attr(root, opts))
return root

View File

@ -22,7 +22,8 @@ class FakeModule(handlers.Handler):
def list_types(self):
return self.types
def handle_part(self, data, ctype, filename, payload, frequency):
def handle_part(self, _data, ctype, filename, # pylint: disable=W0221
payload, frequency):
pass

View File

@ -140,4 +140,3 @@ class TestSimpleRun(helpers.MockerTestCase):
'e': 'f',
}
})

View File

@ -55,7 +55,7 @@ class TestConsumeUserData(helpers.FilesystemMockingTestCase):
#cloud-config
a: b
e: f
run:
run:
- b
- c
'''
@ -67,7 +67,7 @@ run:
#cloud-config
a: e
e: g
run:
run:
- stuff
- morestuff
'''
@ -77,7 +77,7 @@ run:
blob3 = '''
#cloud-config
e:
e:
- 1
- 2
- 3