Merge lp://staging/~codehelp/lava-dispatcher/pep8 into lp://staging/lava-dispatcher
Proposed by
Neil Williams
Status: | Merged |
---|---|
Approved by: | Neil Williams |
Approved revision: | 677 |
Merged at revision: | 638 |
Proposed branch: | lp://staging/~codehelp/lava-dispatcher/pep8 |
Merge into: | lp://staging/lava-dispatcher |
Diff against target: |
2308 lines (+351/-313) 43 files modified
doc/conf.py (+10/-9) doc/examples/plugins/demo-action-plugin/demo_action_plugin/foo.py (+2/-1) doc/examples/plugins/demo-action-plugin/setup.py (+3/-3) doc/external_measurement.rst (+1/-1) lava/dispatcher/commands.py (+3/-2) lava_dispatcher/actions/__init__.py (+3/-2) lava_dispatcher/actions/android_install_cts_medias.py (+2/-2) lava_dispatcher/actions/boot_control.py (+8/-4) lava_dispatcher/actions/deploy.py (+9/-9) lava_dispatcher/actions/launch_control.py (+10/-7) lava_dispatcher/actions/lava_android_test.py (+31/-32) lava_dispatcher/actions/lava_test_shell.py (+27/-23) lava_dispatcher/client/base.py (+13/-10) lava_dispatcher/client/lmc_utils.py (+26/-27) lava_dispatcher/client/targetdevice.py (+1/-1) lava_dispatcher/config.py (+7/-1) lava_dispatcher/context.py (+2/-1) lava_dispatcher/device/capri.py (+7/-4) lava_dispatcher/device/fastboot.py (+3/-3) lava_dispatcher/device/fastmodel.py (+13/-13) lava_dispatcher/device/ipmi_pxe.py (+17/-22) lava_dispatcher/device/k3v2.py (+7/-4) lava_dispatcher/device/master.py (+20/-21) lava_dispatcher/device/nexus10.py (+5/-2) lava_dispatcher/device/qemu.py (+3/-3) lava_dispatcher/device/sdmux.py (+1/-1) lava_dispatcher/device/target.py (+4/-4) lava_dispatcher/device/uefi.py (+1/-1) lava_dispatcher/device/vexpress.py (+5/-4) lava_dispatcher/downloader.py (+8/-9) lava_dispatcher/job.py (+23/-23) lava_dispatcher/lava_test_shell.py (+26/-27) lava_dispatcher/signals/__init__.py (+0/-2) lava_dispatcher/signals/duration.py (+2/-2) lava_dispatcher/signals/shellhooks.py (+8/-2) lava_dispatcher/tarballcache.py (+6/-6) lava_dispatcher/test_data.py (+3/-2) lava_dispatcher/tests/__init__.py (+1/-0) lava_dispatcher/tests/helper.py (+6/-1) lava_dispatcher/tests/test_config.py (+5/-5) lava_dispatcher/tests/test_device_version.py (+8/-6) lava_dispatcher/utils.py (+6/-6) setup.py (+5/-5) |
To merge this branch: | bzr merge lp://staging/~codehelp/lava-dispatcher/pep8 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Antonio Terceiro | Approve | ||
Review via email: mp+175231@code.staging.launchpad.net |
This proposal supersedes a proposal from 2013-07-16.
Description of the change
The complete PEP8 set of changes in preparation for the MultiNode merge.
http://
There are a variety of changes here - a lot of whitespace changes and:
0: Fixing mutable default arguments (var=[])
1: Fixing variables which shadow keywords (dir -> from_dir)
2: Fixing docstrings markup (change ''' to """)
3: Fix some equality operators which should be 'is' instead of '=='
4: Some functions fail to resolve due to missing declarations in the base class.
Updated for changes during first review by Antonio.
To post a comment you must log in.
Thanks for putting this together!
Most of the changes look fine. I have some comments below that need to
be addressed we merge this.
review needs-fixing
> === modified file 'lava_dispatche r/actions/ lava_android_ test.py' /actions/ lava_android_ test.py 2013-04-23 10:33:49 +0000 /actions/ lava_android_ test.py 2013-07-16 16:30:42 +0000 erties' : False, lava_android_ test_run, self).test_name() + \ lava_android_ test_run, self).test_name() + ' (%s)' % test_name android_ tester_ session( ) as session: bundle_ file_name( test_name) android- test", 'run', test_name, host_result_ dir, host_result_ dir,
> --- lava_dispatcher
> +++ lava_dispatcher
> @@ -42,13 +42,12 @@
> 'test_name': {'type': 'string'},
> 'option': {'type': 'string', 'optional': True},
> 'timeout': {'type': 'integer', 'optional': True},
> - },
> + },
> 'additionalProp
> - }
> + }
>
> def test_name(self, test_name, option=None, timeout=-1):
> - return super(cmd_
> - ' (%s)' % test_name
> + return super(cmd_
>
> def run(self, test_name, option=None, timeout=-1):
> #Make sure in test image now
> @@ -56,9 +55,9 @@
> with self.client.
> bundle_name = generate_
> cmds = ["lava-
> - '-s', session.dev_name,
> - '-o', '%s/%s.bundle' % (self.context.
> - bundle_name)]
> + '-s', session.dev_name,
> + '-o', '%s/%s.bundle' % (self.context.
> + bundle_name)]
> if option is not None:
> cmds.extend(['-O', option])
> if timeout != -1:
> @@ -72,8 +71,8 @@
> t.join()
> if rc == 124:
> raise TimeoutError(
> - "The test case(%s) on device(%s) times out" % (
> - test_name, session.dev_name))
> + "The test case(%s) on device(%s) times out" % (
> + test_name, session.dev_name))
Please use the opportunity to fix a typo here: s/times/timed/
> elif rc != 0: erties' : False,
> raise OperationFailed(
> "Failed to run test case(%s) on device(%s) with return "
> @@ -86,15 +85,15 @@
> 'type': 'object',
> 'properties': {
> 'commands': {'type': 'array', 'items': {'type': 'string'},
> - 'optional': True},
> + 'optional': True},
> 'command_file': {'type': 'string', 'optional': True},
> 'parser': {'type': 'string', 'optional': True},
> 'timeout': {'type': 'integer', 'optional': True},
> - },
> + },
> 'additionalProp
> - }
> + }
>
> - def test_name(self, commands=[], command_file=None, parser=None,
> + def test_name(self, commands=None, command_file=None, parser=None,
> timeout=-1):
> if commands:
> return '%s (commands=[%s])' % (
> @@ -102,10 +101,11 @@
> ','....