flake8
-
reviewboard/diffviewer/diffutils.py (Diff revision 1)
Review Request #13660 — Created March 21, 2024 and submitted
The DiffFile model (and the
files
context key when rendering
diffviewer templates) still used variable names from the very first days
of Review Board, when we used a fair bit of Perforce terminology.This change fixes that to use
orig_filename
,orig_revision
,
modified_filename
, andmodified_revision
. This is a breaking change,
but I think that's okay for two reasons:
- The
DiffFile
model is pretty much an implementation detail of our
diffviewer UI. It seems extremely unlikely that anybody would be
digging into this.- The documentation inside
DiffFile
was quite incorrect for many of
the attributes. This was fixed in a prior change, but reinforces my
belief that nobody was using it.
Ran python tests.
Ran js-tests.
Summary | ID |
---|---|
c3569256e79e4322448ac3bd5165f09f675e0ed8 |
Description | From | Last Updated |
---|---|---|
This affects the Diff Context API, right? If so, then we do have to be careful with this, because it's … |
chipx86 | |
line too long (80 > 79 characters) Column: 80 Error code: E501 |
reviewbot | |
I do want to document versioning of any fields that have changed, because from time to time changes do need … |
chipx86 | |
Should this use import type? |
chipx86 |
Commits: |
|
|||||||
---|---|---|---|---|---|---|---|---|
Diff: |
Revision 2 (+382 -282) |
This affects the Diff Context API, right? If so, then we do have to be careful with this, because it's been used in the wild in a couple places in the past. Whether it's actively in use, I don't know, but we should be careful with it.
If this does affect it, then we need to figure out a versioning scheme here. We can discuss that more offline.
reviewboard/static/rb/js/reviews/models/diffFileModel.ts (Diff revision 2) |
---|
I do want to document versioning of any fields that have changed, because from time to time changes do need to be backported and this history could easily be lost.
reviewboard/static/rb/js/reviews/views/diffFileIndexView.ts (Diff revision 2) |
---|
Should this use
import type
?
Commits: |
|
|||||||
---|---|---|---|---|---|---|---|---|
Diff: |
Revision 3 (+432 -284) |