flake8
-
reviewboard/webapi/tests/test_review_request_last_update.py (Diff revision 1) -
reviewboard/webapi/tests/test_review_request_last_update.py (Diff revision 1) F841 local variable 'updated_obj' is assigned to but never used
Review Request #9709 — Created April 25, 2018 and submitted
A while back we started recording who published review requests in the
ChangeDescription
so that re-assigned review requests showed proper
history (instead of just showing the new author doing everything).
This patch updates theReviewRequestLastUpdateResource
to take this
information into account.As a part of this change,
ReviewRequest.get_last_activity
has been
deprecated in favour of a new method,
ReviewRequest.get_last_activity_info
, which returns a dict of
information, including the relevantChangeDescription
, which can be
used to determine the author of the update.Additionally, unit tests have been added to cover the last update
resource's behaviour.
Ran unit tests.
Description | From | Last Updated |
---|---|---|
E303 too many blank lines (2) |
reviewbot | |
F841 local variable 'updated_obj' is assigned to but never used |
reviewbot | |
I feel like we have three test cases here that should probably be three separate test methods. |
david | |
This blank line should go away too. |
david | |
This blank line should go away too |
david | |
Leftover debug output? |
david | |
We have a new section for docstrings. It goes before Args: Deprecated: 4.0: See blah blah... |
chipx86 | |
Missing "Args". |
chipx86 | |
Missing indentation. No need for quotes, just the double backticks. Same below. |
chipx86 | |
Remove the blank line. |
chipx86 | |
is self, probably? |
chipx86 | |
Swap these. |
chipx86 | |
No blank line. |
chipx86 | |
Blank line between these. |
chipx86 | |
Blank line between these. |
chipx86 |
reviewboard/webapi/tests/test_review_request_last_update.py (Diff revision 1) |
---|
reviewboard/webapi/tests/test_review_request_last_update.py (Diff revision 1) |
---|
F841 local variable 'updated_obj' is assigned to but never used
Fix flake8 issues.
Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 2 (+526 -5) |
reviewboard/reviews/tests/test_review_request.py (Diff revision 2) |
---|
I feel like we have three test cases here that should probably be three separate test methods.
reviewboard/webapi/resources/review_request_last_update.py (Diff revision 2) |
---|
This blank line should go away too.
reviewboard/webapi/resources/review_request_last_update.py (Diff revision 2) |
---|
This blank line should go away too
Address David's feedback.
Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 3 (+590 -17) |
reviewboard/reviews/models/review_request.py (Diff revision 3) |
---|
We have a new section for docstrings. It goes before Args:
Deprecated: 4.0: See blah blah...
reviewboard/reviews/models/review_request.py (Diff revision 3) |
---|
Missing indentation.
No need for quotes, just the double backticks. Same below.
reviewboard/webapi/tests/test_review_request_last_update.py (Diff revision 3) |
---|
Blank line between these.
reviewboard/webapi/tests/test_review_request_last_update.py (Diff revision 3) |
---|
Blank line between these.
Addressed Christian's feedback.
Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 4 (+590 -17) |
Commit changes before posting
Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 5 (+602 -17) |