Merge lp:~sergiusens/snapcraft/less-source into lp:~snappy-dev/snapcraft/core
| Status: | Superseded |
|---|---|
| Proposed branch: | lp:~sergiusens/snapcraft/less-source |
| Merge into: | lp:~snappy-dev/snapcraft/core |
| Prerequisite: | lp:~sergiusens/snapcraft/less-complex-collect |
| Diff against target: |
603 lines (+310/-190) 6 files modified
snapcraft/__init__.py (+46/-147) snapcraft/common.py (+5/-0) snapcraft/plugins/tar_content.py (+7/-2) snapcraft/sources.py (+186/-0) snapcraft/tests/test_base_plugin.py (+5/-41) snapcraft/tests/test_sources.py (+61/-0) |
| To merge this branch: | bzr merge lp:~sergiusens/snapcraft/less-source |
| Related bugs: |
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| Sergio Schvezov | Approve on 2015-09-01 | ||
| Michael Vogt | Approve on 2015-09-01 | ||
| Leo Arias | 2015-08-28 | Approve on 2015-08-30 | |
|
Review via email:
|
|||
This proposal has been superseded by a proposal from 2015-09-01.
Commit Message
Moving source management complexity out of the base plugin
Description of the Change
Mostly fixing the 22 in the mccabe output 163:1: 'BasePlugin.
| Michael Vogt (mvo) wrote : | # |
This is really nice work, thanks for doing this! Its a great branch that reduces the complexity and makes everything more modular and easier to read. I put some comments inline but no blockers and not really important, just my 0.02ยข :)
| Snappy Tarmac (snappydevtarmac) wrote : | # |
No proposals found for merge of https:/
| Sergio Schvezov (sergiusens) wrote : | # |
Re approving the minor review request (code comment)
| Snappy Tarmac (snappydevtarmac) wrote : | # |
No proposals found for merge of https:/


this mccabe check is helping a lot, nice work Sergio.
In cases like this: branch= None): .__init_ _(source, source_type, source_tag, source_branch) ionsError( 'can\'t specify both source-tag and source-branch for a mercurial source')
363 + def __init__(self, source, source_type=None, source_tag=None, source_
364 + super()
365 + if source_tag and source_branch:
366 + raise IncompatibleOpt
If you do the argument validation before the call to super.__init__, you will safe a few instructions.
Good to have, but no blocker. +1.