flake8
-
reviewboard/diffviewer/tests/test_diffutils.py (Diff revision 1) Show all issues
Review Request #10130 — Created Aug. 27, 2018 and submitted
Information | |
---|---|
brennie | |
Review Board | |
release-4.0.x | |
|
|
45b9779... | |
Reviewers | |
reviewboard | |
The
get_diff_files
utility can now generate a list of files to diff
that exist between two commits in a diffset. This allows us to generate
diffs between two commits (and therefore to see the diff of any
individual commit). There is currently no UI support for this behaviour,
but that is comming in a future patch.
Ran unit tests.
Description | From | Last Updated |
---|---|---|
F811 redefinition of unused 'test_get_diff_files_with_history_tip_commit' from line 1213 |
![]() |
|
Missing space between the backtick and "diffsets". |
|
|
Here, too. |
|
|
Missing blank line. |
|
|
No blank line needed here. |
|
|
Given the repeated complexity of this, it would be nice to make this whole expected_results building into a private utility … |
|
|
Redundant "diffsets" in this sentence. |
|
|
Same here. |
|
|
Can you compare explicitly against 0? |
|
|
Here, too. |
|
|
Should be .. code-block:: python (note the ::). |
|
|
This doesn't match. |
|
|
Syntax is super wonky here (0and). Does this even run? |
|
|
Should be "base commit" |
|
|
This is a little too fancy. How about: for ancestor in reversed(ancestors): if ancestor.commit_id <= base_commit.pk: base_filediff = ancestor break |
|
|
This looks like a fancy way of just doing by_details.get(base_filediff_details). |
|
Flake8 and typo fixes
Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 2 (+332 -12) |
reviewboard/diffviewer/diffutils.py (Diff revision 2) |
---|
Missing space between the backtick and "diffsets".
reviewboard/diffviewer/tests/test_diffutils.py (Diff revision 2) |
---|
Given the repeated complexity of this, it would be nice to make this whole
expected_results
building into a private utility method.
Addressed feedback.
Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 3 (+354 -14) |
reviewboard/diffviewer/tests/test_diffutils.py (Diff revision 3) |
---|
Should be
.. code-block:: python
(note the::
).
Addressed feedback.
Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 4 (+352 -12) |
reviewboard/diffviewer/diffutils.py (Diff revision 4) |
---|
Syntax is super wonky here (
0and
). Does this even run?
Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 5 (+352 -12) |
reviewboard/diffviewer/diffutils.py (Diff revision 5) |
---|
This is a little too fancy. How about:
for ancestor in reversed(ancestors): if ancestor.commit_id <= base_commit.pk: base_filediff = ancestor break
Addressed feedback.
Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 6 (+348 -12) |
reviewboard/diffviewer/tests/test_diffutils.py (Diff revision 6) |
---|
This looks like a fancy way of just doing
by_details.get(base_filediff_details)
.
Addressed feedback.
Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 7 (+345 -12) |