Merge ~jslarraz/review-tools:strip-pkg-functionality into review-tools:master
Status: | Merged |
---|---|
Merged at revision: | 80a9f97548e7365a60879e2a46940a6f85542941 |
Proposed branch: | ~jslarraz/review-tools:strip-pkg-functionality |
Merge into: | review-tools:master |
Diff against target: |
220 lines (+46/-48) 4 files modified
reviewtools/common.py (+24/-35) reviewtools/sr_common.py (+12/-3) reviewtools/sr_lint.py (+1/-1) reviewtools/sr_tests.py (+9/-9) |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Alex Murray | Approve | ||
Review via email:
|
Commit message
Strip snap related operations (unpack, extract file, list files, list binaries) from review class
Description of the change
Currently unpacking the snap, listing files and binaries and other operations are performed in the __init__function of the Review class. That means that those operations are repeated every time that the Review class or any of its subclasses (i.e. SnapReviewDecla
This MR is intended to strip this functionality from the review class and define a self contained `container` class that handle this functionality. It will enable a followup MR where the `container` object is passed to review classes (instead of file name), thus removing the overhead caused by those duplicated operations.
Additionally pkg_filename, pkg_files and pkg_bin_files have been renamed to filename, files and bin_files as the pkg_prefix looks now redundant in the context of the `container`
LGTM - just a couple minor things to update.