Merge lp://qastaging/~sergiusens/snapcraft/less-source into lp://qastaging/~snappy-dev/snapcraft/core
Proposed by
Sergio Schvezov
Status: | Superseded |
---|---|
Proposed branch: | lp://qastaging/~sergiusens/snapcraft/less-source |
Merge into: | lp://qastaging/~snappy-dev/snapcraft/core |
Prerequisite: | lp://qastaging/~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://qastaging/~sergiusens/snapcraft/less-source |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Sergio Schvezov | Approve | ||
Michael Vogt (community) | Approve | ||
Leo Arias (community) | Approve | ||
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.
To post a comment you must log in.
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.