Merge ~jslarraz/review-tools:move-basecontainer-attributes-to-properties into review-tools:master
Proposed by
Jorge Sancho Larraz
Status: | Merged |
---|---|
Merged at revision: | d888d63d9a84bd6746c4abaddf678baa3a783eab |
Proposed branch: | ~jslarraz/review-tools:move-basecontainer-attributes-to-properties |
Merge into: | review-tools:master |
Diff against target: |
82 lines (+40/-13) 2 files modified
reviewtools/containers/base_container.py (+37/-10) reviewtools/sr_tests.py (+3/-3) |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Alex Murray | Approve | ||
Review via email: mp+466375@code.launchpad.net |
Commit message
move basecontainer attributes to properties
Description of the change
Using properties bring some benefits:
- Related functionality does not need to be called during the initialization but only when it is needed. It simplify unittest avoiding the need to mock related functions under certain circunstances
- Properties may not have a setter. That avoid some error during the development as the property cannot be unexpectedly modified (it needs to be done explicitly via the related _attribute)
To post a comment you must log in.
Nice improvement - LGTM! I wonder if we should have a HACKING.md or similar which describes the preferred coding conventions going forward?