Apply basic colorization to diff
Review Request #11829 — Created Oct. 3, 2021 and updated
Add an option to the
rbt diff
command to
apply basic colorization to the output.
Therbt diff --color-diff
command highlights
removed lines in red and added lines in green.This review request includes the following:
- Utilizing pygments library, format the diff displayed
on terminal with basic colorization. - Add
--color-diff
option torbt diff
command.
- Created
test_diff.py
that contains test cases forrbt diff
command - Tested command arguments and formating the diff using pygments library.
Summary | ID |
---|---|
622bd97c692a5d19caae495823376b8cd233c6c5 | |
b77a7aec6879e99921707ca3539374b6175e34d6 | |
c0515acf1111028bfc17ee798e843acf18ded18c | |
5bcb68b609c9a7eb1dce1c6c1a9015579fb117d6 | |
a787bc38006b09645758ea678caa37d80ce3e35d | |
9ac91d774f655263e4ac081b24880a3450cb835e | |
2ebb07e3c1b77b3e84adb80a28375658bb517d49 | |
cc1d683c47620bf3f460096270db103d26300905 | |
b4387fbb996be884259c7615a411ac04e16bb349 | |
b6e2af6fa0633639e3c68e431f4de3416218df00 | |
318d2b98f4f5e5a9f3e89e40a1526f5ba310e613 | |
a16745ed2856170647bcfc0a5d5e9e159cc5b5e8 | |
87ad76ef3a2c938a42493ab1003857e4b52e92ba | |
2f3d0bac30dedb4c74b199f36d5ab1c8f4e8888f | |
c4d389ccc9d5a052011649d5972a9d9c7cd72c67 | |
8c35cf1a6eb99524fa3f9eac2dadd14d5ccce6da | |
af1ca798e79c3a559fc8c6c06e015aa8d07fd113 | |
798b06c140af403c0e280ebcdcc0f2ac7fccf5f6 | |
00eb30d61779430441ea66adc7b591c96ff8ee2b | |
156975bef5c64c27d5a4df207a3b7fa98ce933a3 | |
0930b630a8dc6f130653be4783c78329f8e144d8 | |
02dbed4973f53a17f384482c152216e3ad829046 | |
e03c45a24e8786405780ae4e0d5d0681e15eb4e7 | |
aa1d865cd90045688b73875451bc9bddfba6636b | |
10f2a81c2141c994505bac6f0eb2d95ccc57121f | |
8c632cf4a6b77613e4e211b7c6724e0813af40aa |
Description | From | Last Updated |
---|---|---|
E251 unexpected spaces around keyword / parameter equals |
reviewbot | |
E251 unexpected spaces around keyword / parameter equals |
reviewbot | |
E128 continuation line under-indented for visual indent |
reviewbot | |
E128 continuation line under-indented for visual indent |
reviewbot | |
E128 continuation line under-indented for visual indent |
reviewbot | |
E128 continuation line under-indented for visual indent |
reviewbot | |
E501 line too long (94 > 79 characters) |
reviewbot | |
E124 closing bracket does not match visual indentation |
reviewbot | |
E501 line too long (94 > 79 characters) |
reviewbot | |
E501 line too long (84 > 79 characters) |
reviewbot | |
E225 missing whitespace around operator |
reviewbot | |
W291 trailing whitespace |
reviewbot | |
E501 line too long (84 > 79 characters) |
reviewbot | |
E251 unexpected spaces around keyword / parameter equals |
reviewbot | |
E251 unexpected spaces around keyword / parameter equals |
reviewbot | |
W291 trailing whitespace |
reviewbot | |
W291 trailing whitespace |
reviewbot | |
It might be nicer to do elif six.PY2 and then an else instead of having nested if else statements |
maubin | |
F841 local variable 'diff' is assigned to but never used |
reviewbot | |
E303 too many blank lines (2) |
reviewbot | |
W292 no newline at end of file |
reviewbot | |
Instead of just having this be a boolean, I think we should follow git's lead and have it be a … |
david | |
F841 local variable 'diff' is assigned to but never used |
reviewbot | |
E225 missing whitespace around operator |
reviewbot | |
E501 line too long (80 > 79 characters) |
reviewbot | |
E225 missing whitespace around operator |
reviewbot | |
F841 local variable 'diff' is assigned to but never used |
reviewbot | |
W291 trailing whitespace |
reviewbot | |
F841 local variable 'diff' is assigned to but never used |
reviewbot | |
F841 local variable 'diff' is assigned to but never used |
reviewbot | |
W503 line break before binary operator |
reviewbot | |
W503 line break before binary operator |
reviewbot | |
E999 SyntaxError: invalid syntax |
reviewbot | |
Perhaps we should call this "display options" to distinguish it from Command.diff_options? |
david | |
Add a blank line between these two. |
david | |
This needs to tell us what the type is. |
david | |
Add a blank line between these two. |
david | |
Please put this blank line back. |
david | |
Indentation is a little bit funky here and things don't quite line up with the parens. I think it might … |
david | |
All test docstrings should start with the word "Testing" for consistency in output. |
david | |
Please add a blank line between these two |
david | |
E999 SyntaxError: invalid syntax |
reviewbot | |
Please add a blank line between these two |
david | |
There's an extra space at the end of this docstring. |
david | |
Let's use single quotes instead of double here. |
david | |
This should be (list of unicode, optional) |
david | |
I don't think this adds useful info--the first line of explanation is sufficient. |
david | |
DIFF is incorrectly capitalized here. |
david | |
Please add a blank line between these two. |
david | |
This needs a docstring. It probably should also be prefixed with _ |
david | |
Please add a blank line between these two. |
david | |
F401 'pygments.highlight' imported but unused |
reviewbot | |
F401 'rbtools.commands.CommandError' imported but unused |
reviewbot | |
W293 blank line contains whitespace |
reviewbot | |
These should be grouped together with full-package imports coming before from imports. Please also alphabetize them (formatters before lexers). import … |
david | |
Let's give this method an imperative name. Perhaps colorize_diff? |
david | |
Codebase docs right now still link to python2, so the type here should be listed as unicode rather than str. … |
david | |
Please dedent this 4 spaces (align with line above it) |
david | |
Please add a blank line between these two. |
david | |
Instead of using the character, put the entire conditional in parens: if (options.color_diff == self.COLOR_ALWAYS or (options.color_diff == self.COLOR_AUTO and … |
david | |
Standard-library imports should go in their own section just after the __future__ import. Order should be full-packages first, then from … |
david | |
This can be a lot simpler: self.assertIn(lines_removed_color_pattern, sample_diff_highlighted) self.assertIn(lines_added_color_pattern, sample_diff_highlighted) Might be nice to shorten some of the variable names … |
david | |
This blank line can go away |
david | |
six isn't part of the standard library, so this should go in the next import group. |
david | |
This description could be more accurate. |
david | |
This should end with a period. |
david | |
Align the sys on the same column as options above it. |
david | |
Test -> Tests |
david | |
Why the .encode() calls? We should be able to operate entirely in unicode-land. |
david | |
F401 'pygments.highlight' imported but unused |
reviewbot | |
These are both considered third-party modules, so should be in the same import group (no blank line here). |
chipx86 | |
This should also have an added_in='3.0' parameter, to allow the documentation to reflect when this option was first made available. |
chipx86 | |
This should have a trailing period. |
chipx86 | |
I feel this should go somewhere lower than main(). It should also probably be a private function. |
chipx86 | |
Looks like this wraps a bit early. The "or" can easily fit on the previous line. |
chipx86 | |
This can be one statement. |
chipx86 | |
These should ideally use keyword arguments. |
chipx86 | |
DiffLexer() is a good default, but something you can do now that this change is basically complete is support pydiffx's … |
chipx86 | |
This can easily be one statement. |
chipx86 | |
Unit tests should focus on testing one condition at a time. So instead of looping through a set of possible … |
chipx86 | |
Looks like this is wrapping prematurely. More can fit on the first line. |
chipx86 | |
Test docstrings should be in the form of: Testing <thing>[ with <conditions>]. So, Testing rbt diff with --color-diff=.... |
chipx86 | |
Small nit: For multi-line strings like this, put the trailing ) on its own line (aligned with the start of … |
chipx86 | |
It's a small nit, but we use %-formatting instead of .format() in our code. |
chipx86 | |
We try to avoid the multi-line with form. Let's use nested with blocks instead. |
chipx86 | |
As above, Testing <thing>[ with <conditions>]. In this case, <thing> would be Diff.colorize_diff |
chipx86 | |
Unwanted blank line here. |
chipx86 | |
+= is faster than .extends in Python. Let's move to that. |
chipx86 | |
This is more generally useful, and we don't want to maintain a bunch of copies of it. Let's move it … |
chipx86 | |
W292 no newline at end of file |
reviewbot | |
W292 no newline at end of file |
reviewbot | |
No reason to create a variable and then return it. Let's just return highlight(...) |
david | |
Why is the extend() version commented out? That's generally a better choice than +=. |
david |
- Commits:
-
Summary ID 622bd97c692a5d19caae495823376b8cd233c6c5 b77a7aec6879e99921707ca3539374b6175e34d6 622bd97c692a5d19caae495823376b8cd233c6c5 b77a7aec6879e99921707ca3539374b6175e34d6 c0515acf1111028bfc17ee798e843acf18ded18c - Diff:
-
Revision 2 (+66 -20)
- Commits:
-
Summary ID 622bd97c692a5d19caae495823376b8cd233c6c5 b77a7aec6879e99921707ca3539374b6175e34d6 c0515acf1111028bfc17ee798e843acf18ded18c 622bd97c692a5d19caae495823376b8cd233c6c5 b77a7aec6879e99921707ca3539374b6175e34d6 c0515acf1111028bfc17ee798e843acf18ded18c 5bcb68b609c9a7eb1dce1c6c1a9015579fb117d6 - Diff:
-
Revision 3 (+74 -22)
- Commits:
-
Summary ID 622bd97c692a5d19caae495823376b8cd233c6c5 b77a7aec6879e99921707ca3539374b6175e34d6 c0515acf1111028bfc17ee798e843acf18ded18c 5bcb68b609c9a7eb1dce1c6c1a9015579fb117d6 622bd97c692a5d19caae495823376b8cd233c6c5 b77a7aec6879e99921707ca3539374b6175e34d6 c0515acf1111028bfc17ee798e843acf18ded18c 5bcb68b609c9a7eb1dce1c6c1a9015579fb117d6 a787bc38006b09645758ea678caa37d80ce3e35d - Diff:
-
Revision 4 (+77 -25)
Checks run (2 succeeded)
- Commits:
-
Summary ID 622bd97c692a5d19caae495823376b8cd233c6c5 b77a7aec6879e99921707ca3539374b6175e34d6 c0515acf1111028bfc17ee798e843acf18ded18c 5bcb68b609c9a7eb1dce1c6c1a9015579fb117d6 a787bc38006b09645758ea678caa37d80ce3e35d 622bd97c692a5d19caae495823376b8cd233c6c5 b77a7aec6879e99921707ca3539374b6175e34d6 c0515acf1111028bfc17ee798e843acf18ded18c 5bcb68b609c9a7eb1dce1c6c1a9015579fb117d6 a787bc38006b09645758ea678caa37d80ce3e35d 9ac91d774f655263e4ac081b24880a3450cb835e 2ebb07e3c1b77b3e84adb80a28375658bb517d49 cc1d683c47620bf3f460096270db103d26300905
- Commits:
-
Summary ID 622bd97c692a5d19caae495823376b8cd233c6c5 b77a7aec6879e99921707ca3539374b6175e34d6 c0515acf1111028bfc17ee798e843acf18ded18c 5bcb68b609c9a7eb1dce1c6c1a9015579fb117d6 a787bc38006b09645758ea678caa37d80ce3e35d 9ac91d774f655263e4ac081b24880a3450cb835e 2ebb07e3c1b77b3e84adb80a28375658bb517d49 cc1d683c47620bf3f460096270db103d26300905 622bd97c692a5d19caae495823376b8cd233c6c5 b77a7aec6879e99921707ca3539374b6175e34d6 c0515acf1111028bfc17ee798e843acf18ded18c 5bcb68b609c9a7eb1dce1c6c1a9015579fb117d6 a787bc38006b09645758ea678caa37d80ce3e35d 9ac91d774f655263e4ac081b24880a3450cb835e 2ebb07e3c1b77b3e84adb80a28375658bb517d49 cc1d683c47620bf3f460096270db103d26300905 b4387fbb996be884259c7615a411ac04e16bb349
- Commits:
-
Summary ID 622bd97c692a5d19caae495823376b8cd233c6c5 b77a7aec6879e99921707ca3539374b6175e34d6 c0515acf1111028bfc17ee798e843acf18ded18c 5bcb68b609c9a7eb1dce1c6c1a9015579fb117d6 a787bc38006b09645758ea678caa37d80ce3e35d 9ac91d774f655263e4ac081b24880a3450cb835e 2ebb07e3c1b77b3e84adb80a28375658bb517d49 cc1d683c47620bf3f460096270db103d26300905 b4387fbb996be884259c7615a411ac04e16bb349 622bd97c692a5d19caae495823376b8cd233c6c5 b77a7aec6879e99921707ca3539374b6175e34d6 c0515acf1111028bfc17ee798e843acf18ded18c 5bcb68b609c9a7eb1dce1c6c1a9015579fb117d6 a787bc38006b09645758ea678caa37d80ce3e35d 9ac91d774f655263e4ac081b24880a3450cb835e 2ebb07e3c1b77b3e84adb80a28375658bb517d49 cc1d683c47620bf3f460096270db103d26300905 b4387fbb996be884259c7615a411ac04e16bb349 b6e2af6fa0633639e3c68e431f4de3416218df00 318d2b98f4f5e5a9f3e89e40a1526f5ba310e613
- Commits:
-
Summary ID 622bd97c692a5d19caae495823376b8cd233c6c5 b77a7aec6879e99921707ca3539374b6175e34d6 c0515acf1111028bfc17ee798e843acf18ded18c 5bcb68b609c9a7eb1dce1c6c1a9015579fb117d6 a787bc38006b09645758ea678caa37d80ce3e35d 9ac91d774f655263e4ac081b24880a3450cb835e 2ebb07e3c1b77b3e84adb80a28375658bb517d49 cc1d683c47620bf3f460096270db103d26300905 b4387fbb996be884259c7615a411ac04e16bb349 b6e2af6fa0633639e3c68e431f4de3416218df00 318d2b98f4f5e5a9f3e89e40a1526f5ba310e613 622bd97c692a5d19caae495823376b8cd233c6c5 b77a7aec6879e99921707ca3539374b6175e34d6 c0515acf1111028bfc17ee798e843acf18ded18c 5bcb68b609c9a7eb1dce1c6c1a9015579fb117d6 a787bc38006b09645758ea678caa37d80ce3e35d 9ac91d774f655263e4ac081b24880a3450cb835e 2ebb07e3c1b77b3e84adb80a28375658bb517d49 cc1d683c47620bf3f460096270db103d26300905 b4387fbb996be884259c7615a411ac04e16bb349 b6e2af6fa0633639e3c68e431f4de3416218df00 318d2b98f4f5e5a9f3e89e40a1526f5ba310e613 a16745ed2856170647bcfc0a5d5e9e159cc5b5e8
- Commits:
-
Summary ID 622bd97c692a5d19caae495823376b8cd233c6c5 b77a7aec6879e99921707ca3539374b6175e34d6 c0515acf1111028bfc17ee798e843acf18ded18c 5bcb68b609c9a7eb1dce1c6c1a9015579fb117d6 a787bc38006b09645758ea678caa37d80ce3e35d 9ac91d774f655263e4ac081b24880a3450cb835e 2ebb07e3c1b77b3e84adb80a28375658bb517d49 cc1d683c47620bf3f460096270db103d26300905 b4387fbb996be884259c7615a411ac04e16bb349 b6e2af6fa0633639e3c68e431f4de3416218df00 318d2b98f4f5e5a9f3e89e40a1526f5ba310e613 a16745ed2856170647bcfc0a5d5e9e159cc5b5e8 622bd97c692a5d19caae495823376b8cd233c6c5 b77a7aec6879e99921707ca3539374b6175e34d6 c0515acf1111028bfc17ee798e843acf18ded18c 5bcb68b609c9a7eb1dce1c6c1a9015579fb117d6 a787bc38006b09645758ea678caa37d80ce3e35d 9ac91d774f655263e4ac081b24880a3450cb835e 2ebb07e3c1b77b3e84adb80a28375658bb517d49 cc1d683c47620bf3f460096270db103d26300905 b4387fbb996be884259c7615a411ac04e16bb349 b6e2af6fa0633639e3c68e431f4de3416218df00 318d2b98f4f5e5a9f3e89e40a1526f5ba310e613 a16745ed2856170647bcfc0a5d5e9e159cc5b5e8 87ad76ef3a2c938a42493ab1003857e4b52e92ba
- Change Summary:
-
New test cases and new screenshots. Minor updates to the
diff_colorization
function. - Description:
-
Add an option to the
rbt diff
command toapply basic colorization to the output. ~ The rbt diff --color
command highlights~ The rbt diff --color-diff
command highlightsremoved lines in red and added lines in green. This review request includes the following:
- Utilizing pygments library, format the diff displayed
on terminal with basic colorization.
~ - Add
--color
option torbt diff
command.
~ - Add
--color-diff
option torbt diff
command.
- Utilizing pygments library, format the diff displayed
- Testing Done:
-
~ Work in progress.
~ ~ - Created
test_diff.py
that contains test cases forrbt diff
command
~ - Tested command arguments and formating the diff using pygments library.
- Currently, there are not test cases for
rbt diff
command.- Therefore, we will need to write test cases for the command. - Created
- Commits:
-
Summary ID 622bd97c692a5d19caae495823376b8cd233c6c5 b77a7aec6879e99921707ca3539374b6175e34d6 c0515acf1111028bfc17ee798e843acf18ded18c 5bcb68b609c9a7eb1dce1c6c1a9015579fb117d6 a787bc38006b09645758ea678caa37d80ce3e35d 9ac91d774f655263e4ac081b24880a3450cb835e 2ebb07e3c1b77b3e84adb80a28375658bb517d49 cc1d683c47620bf3f460096270db103d26300905 b4387fbb996be884259c7615a411ac04e16bb349 b6e2af6fa0633639e3c68e431f4de3416218df00 318d2b98f4f5e5a9f3e89e40a1526f5ba310e613 a16745ed2856170647bcfc0a5d5e9e159cc5b5e8 87ad76ef3a2c938a42493ab1003857e4b52e92ba 622bd97c692a5d19caae495823376b8cd233c6c5 b77a7aec6879e99921707ca3539374b6175e34d6 c0515acf1111028bfc17ee798e843acf18ded18c 5bcb68b609c9a7eb1dce1c6c1a9015579fb117d6 a787bc38006b09645758ea678caa37d80ce3e35d 9ac91d774f655263e4ac081b24880a3450cb835e 2ebb07e3c1b77b3e84adb80a28375658bb517d49 cc1d683c47620bf3f460096270db103d26300905 b4387fbb996be884259c7615a411ac04e16bb349 b6e2af6fa0633639e3c68e431f4de3416218df00 318d2b98f4f5e5a9f3e89e40a1526f5ba310e613 a16745ed2856170647bcfc0a5d5e9e159cc5b5e8 87ad76ef3a2c938a42493ab1003857e4b52e92ba 2f3d0bac30dedb4c74b199f36d5ab1c8f4e8888f c4d389ccc9d5a052011649d5972a9d9c7cd72c67 8c35cf1a6eb99524fa3f9eac2dadd14d5ccce6da af1ca798e79c3a559fc8c6c06e015aa8d07fd113 - Diff:
-
Revision 10 (+340 -74)
-
rbt_diff.png: rbt_diff.pngrbt_diff (outdated).pngrbt_diff_--color.png: rbt_diff_--color.pngrbt_diff_--color (outdated).png - Added Files:
- Change Summary:
-
New test cases and new screenshots. Minor updates to the diff_colorization function.
Fixed flake8 errors.
- Commits:
-
Summary ID 622bd97c692a5d19caae495823376b8cd233c6c5 b77a7aec6879e99921707ca3539374b6175e34d6 c0515acf1111028bfc17ee798e843acf18ded18c 5bcb68b609c9a7eb1dce1c6c1a9015579fb117d6 a787bc38006b09645758ea678caa37d80ce3e35d 9ac91d774f655263e4ac081b24880a3450cb835e 2ebb07e3c1b77b3e84adb80a28375658bb517d49 cc1d683c47620bf3f460096270db103d26300905 b4387fbb996be884259c7615a411ac04e16bb349 b6e2af6fa0633639e3c68e431f4de3416218df00 318d2b98f4f5e5a9f3e89e40a1526f5ba310e613 a16745ed2856170647bcfc0a5d5e9e159cc5b5e8 87ad76ef3a2c938a42493ab1003857e4b52e92ba 2f3d0bac30dedb4c74b199f36d5ab1c8f4e8888f c4d389ccc9d5a052011649d5972a9d9c7cd72c67 8c35cf1a6eb99524fa3f9eac2dadd14d5ccce6da af1ca798e79c3a559fc8c6c06e015aa8d07fd113 622bd97c692a5d19caae495823376b8cd233c6c5 b77a7aec6879e99921707ca3539374b6175e34d6 c0515acf1111028bfc17ee798e843acf18ded18c 5bcb68b609c9a7eb1dce1c6c1a9015579fb117d6 a787bc38006b09645758ea678caa37d80ce3e35d 9ac91d774f655263e4ac081b24880a3450cb835e 2ebb07e3c1b77b3e84adb80a28375658bb517d49 cc1d683c47620bf3f460096270db103d26300905 b4387fbb996be884259c7615a411ac04e16bb349 b6e2af6fa0633639e3c68e431f4de3416218df00 318d2b98f4f5e5a9f3e89e40a1526f5ba310e613 a16745ed2856170647bcfc0a5d5e9e159cc5b5e8 87ad76ef3a2c938a42493ab1003857e4b52e92ba 2f3d0bac30dedb4c74b199f36d5ab1c8f4e8888f c4d389ccc9d5a052011649d5972a9d9c7cd72c67 8c35cf1a6eb99524fa3f9eac2dadd14d5ccce6da af1ca798e79c3a559fc8c6c06e015aa8d07fd113 798b06c140af403c0e280ebcdcc0f2ac7fccf5f6
-
This is mostly a bunch of small trivial issues with formatting. I do have one question about string types in the comment on line 100/139.
What is left to do for this change? Should the
[WIP]
tag be removed? -
-
-
-
-
-
Indentation is a little bit funky here and things don't quite line up with the parens. I think it might be a little easier to read if we swapped the order:
if (self.options.color_diff == self.COLOR_ALWAYS or (self.options.color_diff == self.COLOR_AUTO and sys.stdout.isatty())):
Note how we align with the parens for both cases.
I also have a question here: On Python 2, we can be pretty freewheeling with string types, but things are stricter on Python 3. Does Pygments return
str
orbytes
? -
-
-
-
-
-
-
-
-
-
-
- Change Summary:
-
Minor updates to code which addresses feedbacks provided on the review request.
- Commits:
-
Summary ID 622bd97c692a5d19caae495823376b8cd233c6c5 b77a7aec6879e99921707ca3539374b6175e34d6 c0515acf1111028bfc17ee798e843acf18ded18c 5bcb68b609c9a7eb1dce1c6c1a9015579fb117d6 a787bc38006b09645758ea678caa37d80ce3e35d 9ac91d774f655263e4ac081b24880a3450cb835e 2ebb07e3c1b77b3e84adb80a28375658bb517d49 cc1d683c47620bf3f460096270db103d26300905 b4387fbb996be884259c7615a411ac04e16bb349 b6e2af6fa0633639e3c68e431f4de3416218df00 318d2b98f4f5e5a9f3e89e40a1526f5ba310e613 a16745ed2856170647bcfc0a5d5e9e159cc5b5e8 87ad76ef3a2c938a42493ab1003857e4b52e92ba 2f3d0bac30dedb4c74b199f36d5ab1c8f4e8888f c4d389ccc9d5a052011649d5972a9d9c7cd72c67 8c35cf1a6eb99524fa3f9eac2dadd14d5ccce6da af1ca798e79c3a559fc8c6c06e015aa8d07fd113 798b06c140af403c0e280ebcdcc0f2ac7fccf5f6 622bd97c692a5d19caae495823376b8cd233c6c5 b77a7aec6879e99921707ca3539374b6175e34d6 c0515acf1111028bfc17ee798e843acf18ded18c 5bcb68b609c9a7eb1dce1c6c1a9015579fb117d6 a787bc38006b09645758ea678caa37d80ce3e35d 9ac91d774f655263e4ac081b24880a3450cb835e 2ebb07e3c1b77b3e84adb80a28375658bb517d49 cc1d683c47620bf3f460096270db103d26300905 b4387fbb996be884259c7615a411ac04e16bb349 b6e2af6fa0633639e3c68e431f4de3416218df00 318d2b98f4f5e5a9f3e89e40a1526f5ba310e613 a16745ed2856170647bcfc0a5d5e9e159cc5b5e8 87ad76ef3a2c938a42493ab1003857e4b52e92ba 2f3d0bac30dedb4c74b199f36d5ab1c8f4e8888f c4d389ccc9d5a052011649d5972a9d9c7cd72c67 8c35cf1a6eb99524fa3f9eac2dadd14d5ccce6da af1ca798e79c3a559fc8c6c06e015aa8d07fd113 798b06c140af403c0e280ebcdcc0f2ac7fccf5f6 00eb30d61779430441ea66adc7b591c96ff8ee2b
- Change Summary:
-
Fixed issues rasied by Review Bot. Minor updates to code which addresses feedbacks provided on the review request.
- Commits:
-
Summary ID 622bd97c692a5d19caae495823376b8cd233c6c5 b77a7aec6879e99921707ca3539374b6175e34d6 c0515acf1111028bfc17ee798e843acf18ded18c 5bcb68b609c9a7eb1dce1c6c1a9015579fb117d6 a787bc38006b09645758ea678caa37d80ce3e35d 9ac91d774f655263e4ac081b24880a3450cb835e 2ebb07e3c1b77b3e84adb80a28375658bb517d49 cc1d683c47620bf3f460096270db103d26300905 b4387fbb996be884259c7615a411ac04e16bb349 b6e2af6fa0633639e3c68e431f4de3416218df00 318d2b98f4f5e5a9f3e89e40a1526f5ba310e613 a16745ed2856170647bcfc0a5d5e9e159cc5b5e8 87ad76ef3a2c938a42493ab1003857e4b52e92ba 2f3d0bac30dedb4c74b199f36d5ab1c8f4e8888f c4d389ccc9d5a052011649d5972a9d9c7cd72c67 8c35cf1a6eb99524fa3f9eac2dadd14d5ccce6da af1ca798e79c3a559fc8c6c06e015aa8d07fd113 798b06c140af403c0e280ebcdcc0f2ac7fccf5f6 00eb30d61779430441ea66adc7b591c96ff8ee2b 622bd97c692a5d19caae495823376b8cd233c6c5 b77a7aec6879e99921707ca3539374b6175e34d6 c0515acf1111028bfc17ee798e843acf18ded18c 5bcb68b609c9a7eb1dce1c6c1a9015579fb117d6 a787bc38006b09645758ea678caa37d80ce3e35d 9ac91d774f655263e4ac081b24880a3450cb835e 2ebb07e3c1b77b3e84adb80a28375658bb517d49 cc1d683c47620bf3f460096270db103d26300905 b4387fbb996be884259c7615a411ac04e16bb349 b6e2af6fa0633639e3c68e431f4de3416218df00 318d2b98f4f5e5a9f3e89e40a1526f5ba310e613 a16745ed2856170647bcfc0a5d5e9e159cc5b5e8 87ad76ef3a2c938a42493ab1003857e4b52e92ba 2f3d0bac30dedb4c74b199f36d5ab1c8f4e8888f c4d389ccc9d5a052011649d5972a9d9c7cd72c67 8c35cf1a6eb99524fa3f9eac2dadd14d5ccce6da af1ca798e79c3a559fc8c6c06e015aa8d07fd113 798b06c140af403c0e280ebcdcc0f2ac7fccf5f6 00eb30d61779430441ea66adc7b591c96ff8ee2b 156975bef5c64c27d5a4df207a3b7fa98ce933a3
Checks run (2 succeeded)
-
-
These should be grouped together with full-package imports coming before
from
imports. Please also alphabetize them (formatters before lexers).import six from pygments import highlight ...
-
-
Codebase docs right now still link to python2, so the type here should be listed as
unicode
rather thanstr
. This line should also just be a type, not list any kind of variable name. -
-
-
Instead of using the character, put the entire conditional in parens:
if (options.color_diff == self.COLOR_ALWAYS or (options.color_diff == self.COLOR_AUTO and sys.stdout.isatty())):
-
Standard-library imports should go in their own section just after the
__future__
import. Order should be full-packages first, then from imports, and everything alphabetized. This also needs to usesix
in order to get the right StringIO implementation on both python 2 and 3 (which goes in its own import group as a "third party module"):from __future__ import unicode_literals import sys from contextlib import contextmanager from six.moves import cStringIO as StringIO from rbtools.commands.diff import Diff from rbtools.utils.testbase import RBTestBase
-
This can be a lot simpler:
self.assertIn(lines_removed_color_pattern, sample_diff_highlighted) self.assertIn(lines_added_color_pattern, sample_diff_highlighted)
Might be nice to shorten some of the variable names too. Perhaps just
highlighted
,added_color
, andremoved_color
? -
- Change Summary:
-
Ordered import statments, updated function name and test cases, and addressed feedback on review request.
- Commits:
-
Summary ID 622bd97c692a5d19caae495823376b8cd233c6c5 b77a7aec6879e99921707ca3539374b6175e34d6 c0515acf1111028bfc17ee798e843acf18ded18c 5bcb68b609c9a7eb1dce1c6c1a9015579fb117d6 a787bc38006b09645758ea678caa37d80ce3e35d 9ac91d774f655263e4ac081b24880a3450cb835e 2ebb07e3c1b77b3e84adb80a28375658bb517d49 cc1d683c47620bf3f460096270db103d26300905 b4387fbb996be884259c7615a411ac04e16bb349 b6e2af6fa0633639e3c68e431f4de3416218df00 318d2b98f4f5e5a9f3e89e40a1526f5ba310e613 a16745ed2856170647bcfc0a5d5e9e159cc5b5e8 87ad76ef3a2c938a42493ab1003857e4b52e92ba 2f3d0bac30dedb4c74b199f36d5ab1c8f4e8888f c4d389ccc9d5a052011649d5972a9d9c7cd72c67 8c35cf1a6eb99524fa3f9eac2dadd14d5ccce6da af1ca798e79c3a559fc8c6c06e015aa8d07fd113 798b06c140af403c0e280ebcdcc0f2ac7fccf5f6 00eb30d61779430441ea66adc7b591c96ff8ee2b 156975bef5c64c27d5a4df207a3b7fa98ce933a3 622bd97c692a5d19caae495823376b8cd233c6c5 b77a7aec6879e99921707ca3539374b6175e34d6 c0515acf1111028bfc17ee798e843acf18ded18c 5bcb68b609c9a7eb1dce1c6c1a9015579fb117d6 a787bc38006b09645758ea678caa37d80ce3e35d 9ac91d774f655263e4ac081b24880a3450cb835e 2ebb07e3c1b77b3e84adb80a28375658bb517d49 cc1d683c47620bf3f460096270db103d26300905 b4387fbb996be884259c7615a411ac04e16bb349 b6e2af6fa0633639e3c68e431f4de3416218df00 318d2b98f4f5e5a9f3e89e40a1526f5ba310e613 a16745ed2856170647bcfc0a5d5e9e159cc5b5e8 87ad76ef3a2c938a42493ab1003857e4b52e92ba 2f3d0bac30dedb4c74b199f36d5ab1c8f4e8888f c4d389ccc9d5a052011649d5972a9d9c7cd72c67 8c35cf1a6eb99524fa3f9eac2dadd14d5ccce6da af1ca798e79c3a559fc8c6c06e015aa8d07fd113 798b06c140af403c0e280ebcdcc0f2ac7fccf5f6 00eb30d61779430441ea66adc7b591c96ff8ee2b 156975bef5c64c27d5a4df207a3b7fa98ce933a3 0930b630a8dc6f130653be4783c78329f8e144d8
Checks run (2 succeeded)
- Change Summary:
-
Minor code changes to address feedback on review request.
- Commits:
-
Summary ID 622bd97c692a5d19caae495823376b8cd233c6c5 b77a7aec6879e99921707ca3539374b6175e34d6 c0515acf1111028bfc17ee798e843acf18ded18c 5bcb68b609c9a7eb1dce1c6c1a9015579fb117d6 a787bc38006b09645758ea678caa37d80ce3e35d 9ac91d774f655263e4ac081b24880a3450cb835e 2ebb07e3c1b77b3e84adb80a28375658bb517d49 cc1d683c47620bf3f460096270db103d26300905 b4387fbb996be884259c7615a411ac04e16bb349 b6e2af6fa0633639e3c68e431f4de3416218df00 318d2b98f4f5e5a9f3e89e40a1526f5ba310e613 a16745ed2856170647bcfc0a5d5e9e159cc5b5e8 87ad76ef3a2c938a42493ab1003857e4b52e92ba 2f3d0bac30dedb4c74b199f36d5ab1c8f4e8888f c4d389ccc9d5a052011649d5972a9d9c7cd72c67 8c35cf1a6eb99524fa3f9eac2dadd14d5ccce6da af1ca798e79c3a559fc8c6c06e015aa8d07fd113 798b06c140af403c0e280ebcdcc0f2ac7fccf5f6 00eb30d61779430441ea66adc7b591c96ff8ee2b 156975bef5c64c27d5a4df207a3b7fa98ce933a3 0930b630a8dc6f130653be4783c78329f8e144d8 622bd97c692a5d19caae495823376b8cd233c6c5 b77a7aec6879e99921707ca3539374b6175e34d6 c0515acf1111028bfc17ee798e843acf18ded18c 5bcb68b609c9a7eb1dce1c6c1a9015579fb117d6 a787bc38006b09645758ea678caa37d80ce3e35d 9ac91d774f655263e4ac081b24880a3450cb835e 2ebb07e3c1b77b3e84adb80a28375658bb517d49 cc1d683c47620bf3f460096270db103d26300905 b4387fbb996be884259c7615a411ac04e16bb349 b6e2af6fa0633639e3c68e431f4de3416218df00 318d2b98f4f5e5a9f3e89e40a1526f5ba310e613 a16745ed2856170647bcfc0a5d5e9e159cc5b5e8 87ad76ef3a2c938a42493ab1003857e4b52e92ba 2f3d0bac30dedb4c74b199f36d5ab1c8f4e8888f c4d389ccc9d5a052011649d5972a9d9c7cd72c67 8c35cf1a6eb99524fa3f9eac2dadd14d5ccce6da af1ca798e79c3a559fc8c6c06e015aa8d07fd113 798b06c140af403c0e280ebcdcc0f2ac7fccf5f6 00eb30d61779430441ea66adc7b591c96ff8ee2b 156975bef5c64c27d5a4df207a3b7fa98ce933a3 0930b630a8dc6f130653be4783c78329f8e144d8 02dbed4973f53a17f384482c152216e3ad829046
Checks run (2 succeeded)
- Change Summary:
-
Removed
.encode()
and updatedself.assertIn
. - Commits:
-
Summary ID 622bd97c692a5d19caae495823376b8cd233c6c5 b77a7aec6879e99921707ca3539374b6175e34d6 c0515acf1111028bfc17ee798e843acf18ded18c 5bcb68b609c9a7eb1dce1c6c1a9015579fb117d6 a787bc38006b09645758ea678caa37d80ce3e35d 9ac91d774f655263e4ac081b24880a3450cb835e 2ebb07e3c1b77b3e84adb80a28375658bb517d49 cc1d683c47620bf3f460096270db103d26300905 b4387fbb996be884259c7615a411ac04e16bb349 b6e2af6fa0633639e3c68e431f4de3416218df00 318d2b98f4f5e5a9f3e89e40a1526f5ba310e613 a16745ed2856170647bcfc0a5d5e9e159cc5b5e8 87ad76ef3a2c938a42493ab1003857e4b52e92ba 2f3d0bac30dedb4c74b199f36d5ab1c8f4e8888f c4d389ccc9d5a052011649d5972a9d9c7cd72c67 8c35cf1a6eb99524fa3f9eac2dadd14d5ccce6da af1ca798e79c3a559fc8c6c06e015aa8d07fd113 798b06c140af403c0e280ebcdcc0f2ac7fccf5f6 00eb30d61779430441ea66adc7b591c96ff8ee2b 156975bef5c64c27d5a4df207a3b7fa98ce933a3 0930b630a8dc6f130653be4783c78329f8e144d8 02dbed4973f53a17f384482c152216e3ad829046 622bd97c692a5d19caae495823376b8cd233c6c5 b77a7aec6879e99921707ca3539374b6175e34d6 c0515acf1111028bfc17ee798e843acf18ded18c 5bcb68b609c9a7eb1dce1c6c1a9015579fb117d6 a787bc38006b09645758ea678caa37d80ce3e35d 9ac91d774f655263e4ac081b24880a3450cb835e 2ebb07e3c1b77b3e84adb80a28375658bb517d49 cc1d683c47620bf3f460096270db103d26300905 b4387fbb996be884259c7615a411ac04e16bb349 b6e2af6fa0633639e3c68e431f4de3416218df00 318d2b98f4f5e5a9f3e89e40a1526f5ba310e613 a16745ed2856170647bcfc0a5d5e9e159cc5b5e8 87ad76ef3a2c938a42493ab1003857e4b52e92ba 2f3d0bac30dedb4c74b199f36d5ab1c8f4e8888f c4d389ccc9d5a052011649d5972a9d9c7cd72c67 8c35cf1a6eb99524fa3f9eac2dadd14d5ccce6da af1ca798e79c3a559fc8c6c06e015aa8d07fd113 798b06c140af403c0e280ebcdcc0f2ac7fccf5f6 00eb30d61779430441ea66adc7b591c96ff8ee2b 156975bef5c64c27d5a4df207a3b7fa98ce933a3 0930b630a8dc6f130653be4783c78329f8e144d8 02dbed4973f53a17f384482c152216e3ad829046 e03c45a24e8786405780ae4e0d5d0681e15eb4e7
- Change Summary:
-
Removed unused imports.
- Commits:
-
Summary ID 622bd97c692a5d19caae495823376b8cd233c6c5 b77a7aec6879e99921707ca3539374b6175e34d6 c0515acf1111028bfc17ee798e843acf18ded18c 5bcb68b609c9a7eb1dce1c6c1a9015579fb117d6 a787bc38006b09645758ea678caa37d80ce3e35d 9ac91d774f655263e4ac081b24880a3450cb835e 2ebb07e3c1b77b3e84adb80a28375658bb517d49 cc1d683c47620bf3f460096270db103d26300905 b4387fbb996be884259c7615a411ac04e16bb349 b6e2af6fa0633639e3c68e431f4de3416218df00 318d2b98f4f5e5a9f3e89e40a1526f5ba310e613 a16745ed2856170647bcfc0a5d5e9e159cc5b5e8 87ad76ef3a2c938a42493ab1003857e4b52e92ba 2f3d0bac30dedb4c74b199f36d5ab1c8f4e8888f c4d389ccc9d5a052011649d5972a9d9c7cd72c67 8c35cf1a6eb99524fa3f9eac2dadd14d5ccce6da af1ca798e79c3a559fc8c6c06e015aa8d07fd113 798b06c140af403c0e280ebcdcc0f2ac7fccf5f6 00eb30d61779430441ea66adc7b591c96ff8ee2b 156975bef5c64c27d5a4df207a3b7fa98ce933a3 0930b630a8dc6f130653be4783c78329f8e144d8 02dbed4973f53a17f384482c152216e3ad829046 e03c45a24e8786405780ae4e0d5d0681e15eb4e7 622bd97c692a5d19caae495823376b8cd233c6c5 b77a7aec6879e99921707ca3539374b6175e34d6 c0515acf1111028bfc17ee798e843acf18ded18c 5bcb68b609c9a7eb1dce1c6c1a9015579fb117d6 a787bc38006b09645758ea678caa37d80ce3e35d 9ac91d774f655263e4ac081b24880a3450cb835e 2ebb07e3c1b77b3e84adb80a28375658bb517d49 cc1d683c47620bf3f460096270db103d26300905 b4387fbb996be884259c7615a411ac04e16bb349 b6e2af6fa0633639e3c68e431f4de3416218df00 318d2b98f4f5e5a9f3e89e40a1526f5ba310e613 a16745ed2856170647bcfc0a5d5e9e159cc5b5e8 87ad76ef3a2c938a42493ab1003857e4b52e92ba 2f3d0bac30dedb4c74b199f36d5ab1c8f4e8888f c4d389ccc9d5a052011649d5972a9d9c7cd72c67 8c35cf1a6eb99524fa3f9eac2dadd14d5ccce6da af1ca798e79c3a559fc8c6c06e015aa8d07fd113 798b06c140af403c0e280ebcdcc0f2ac7fccf5f6 00eb30d61779430441ea66adc7b591c96ff8ee2b 156975bef5c64c27d5a4df207a3b7fa98ce933a3 0930b630a8dc6f130653be4783c78329f8e144d8 02dbed4973f53a17f384482c152216e3ad829046 e03c45a24e8786405780ae4e0d5d0681e15eb4e7 aa1d865cd90045688b73875451bc9bddfba6636b
Checks run (2 succeeded)
-
-
These are both considered third-party modules, so should be in the same import group (no blank line here).
-
This should also have an
added_in='3.0'
parameter, to allow the documentation to reflect when this option was first made available. -
-
-
-
-
-
DiffLexer()
is a good default, but something you can do now that this change is basically complete is support pydiffx'spydiffx.integrations.pygments_lexer.DiffXLexer
whendiff.startswith(b'#diffx')
.Unit tests would be necessary to make sure that's handled right.
-
-
Unit tests should focus on testing one condition at a time. So instead of looping through a set of possible options and checking results, you should have a unit test for each possible option, and document that in the docstring. When there's a regression, it becomes easier to spot the extent of the fallout.
You can have a private convenience function that does the bulk of the test and call it from each conditional test function.
-
-
Test docstrings should be in the form of:
Testing <thing>[ with <conditions>]
.So,
Testing rbt diff with --color-diff=...
. -
Small nit: For multi-line strings like this, put the trailing
)
on its own line (aligned with the start of the variable name defining the string).You'll do this below as well.
-
-
-
-
-
-
This is more generally useful, and we don't want to maintain a bunch of copies of it. Let's move it to
rbtools.testing.testcase.TestCase
.
- Change Summary:
-
updated colorize_diff to private method, unit tests to focus on single test cases, and
_capture_sys_output
. Addressed feedbacks on review request. - Commits:
-
Summary ID 622bd97c692a5d19caae495823376b8cd233c6c5 b77a7aec6879e99921707ca3539374b6175e34d6 c0515acf1111028bfc17ee798e843acf18ded18c 5bcb68b609c9a7eb1dce1c6c1a9015579fb117d6 a787bc38006b09645758ea678caa37d80ce3e35d 9ac91d774f655263e4ac081b24880a3450cb835e 2ebb07e3c1b77b3e84adb80a28375658bb517d49 cc1d683c47620bf3f460096270db103d26300905 b4387fbb996be884259c7615a411ac04e16bb349 b6e2af6fa0633639e3c68e431f4de3416218df00 318d2b98f4f5e5a9f3e89e40a1526f5ba310e613 a16745ed2856170647bcfc0a5d5e9e159cc5b5e8 87ad76ef3a2c938a42493ab1003857e4b52e92ba 2f3d0bac30dedb4c74b199f36d5ab1c8f4e8888f c4d389ccc9d5a052011649d5972a9d9c7cd72c67 8c35cf1a6eb99524fa3f9eac2dadd14d5ccce6da af1ca798e79c3a559fc8c6c06e015aa8d07fd113 798b06c140af403c0e280ebcdcc0f2ac7fccf5f6 00eb30d61779430441ea66adc7b591c96ff8ee2b 156975bef5c64c27d5a4df207a3b7fa98ce933a3 0930b630a8dc6f130653be4783c78329f8e144d8 02dbed4973f53a17f384482c152216e3ad829046 e03c45a24e8786405780ae4e0d5d0681e15eb4e7 aa1d865cd90045688b73875451bc9bddfba6636b 622bd97c692a5d19caae495823376b8cd233c6c5 b77a7aec6879e99921707ca3539374b6175e34d6 c0515acf1111028bfc17ee798e843acf18ded18c 5bcb68b609c9a7eb1dce1c6c1a9015579fb117d6 a787bc38006b09645758ea678caa37d80ce3e35d 9ac91d774f655263e4ac081b24880a3450cb835e 2ebb07e3c1b77b3e84adb80a28375658bb517d49 cc1d683c47620bf3f460096270db103d26300905 b4387fbb996be884259c7615a411ac04e16bb349 b6e2af6fa0633639e3c68e431f4de3416218df00 318d2b98f4f5e5a9f3e89e40a1526f5ba310e613 a16745ed2856170647bcfc0a5d5e9e159cc5b5e8 87ad76ef3a2c938a42493ab1003857e4b52e92ba 2f3d0bac30dedb4c74b199f36d5ab1c8f4e8888f c4d389ccc9d5a052011649d5972a9d9c7cd72c67 8c35cf1a6eb99524fa3f9eac2dadd14d5ccce6da af1ca798e79c3a559fc8c6c06e015aa8d07fd113 798b06c140af403c0e280ebcdcc0f2ac7fccf5f6 00eb30d61779430441ea66adc7b591c96ff8ee2b 156975bef5c64c27d5a4df207a3b7fa98ce933a3 0930b630a8dc6f130653be4783c78329f8e144d8 02dbed4973f53a17f384482c152216e3ad829046 e03c45a24e8786405780ae4e0d5d0681e15eb4e7 aa1d865cd90045688b73875451bc9bddfba6636b 1f0b992978ce8462d3407c57591eccad1b1da4e8
- Change Summary:
-
Updated colorize_diff to private method, unit tests to focus on single test cases, and _capture_sys_output. Addressed feedbacks on review request.
- Commits:
-
Summary ID 622bd97c692a5d19caae495823376b8cd233c6c5 b77a7aec6879e99921707ca3539374b6175e34d6 c0515acf1111028bfc17ee798e843acf18ded18c 5bcb68b609c9a7eb1dce1c6c1a9015579fb117d6 a787bc38006b09645758ea678caa37d80ce3e35d 9ac91d774f655263e4ac081b24880a3450cb835e 2ebb07e3c1b77b3e84adb80a28375658bb517d49 cc1d683c47620bf3f460096270db103d26300905 b4387fbb996be884259c7615a411ac04e16bb349 b6e2af6fa0633639e3c68e431f4de3416218df00 318d2b98f4f5e5a9f3e89e40a1526f5ba310e613 a16745ed2856170647bcfc0a5d5e9e159cc5b5e8 87ad76ef3a2c938a42493ab1003857e4b52e92ba 2f3d0bac30dedb4c74b199f36d5ab1c8f4e8888f c4d389ccc9d5a052011649d5972a9d9c7cd72c67 8c35cf1a6eb99524fa3f9eac2dadd14d5ccce6da af1ca798e79c3a559fc8c6c06e015aa8d07fd113 798b06c140af403c0e280ebcdcc0f2ac7fccf5f6 00eb30d61779430441ea66adc7b591c96ff8ee2b 156975bef5c64c27d5a4df207a3b7fa98ce933a3 0930b630a8dc6f130653be4783c78329f8e144d8 02dbed4973f53a17f384482c152216e3ad829046 e03c45a24e8786405780ae4e0d5d0681e15eb4e7 aa1d865cd90045688b73875451bc9bddfba6636b 1f0b992978ce8462d3407c57591eccad1b1da4e8 622bd97c692a5d19caae495823376b8cd233c6c5 b77a7aec6879e99921707ca3539374b6175e34d6 c0515acf1111028bfc17ee798e843acf18ded18c 5bcb68b609c9a7eb1dce1c6c1a9015579fb117d6 a787bc38006b09645758ea678caa37d80ce3e35d 9ac91d774f655263e4ac081b24880a3450cb835e 2ebb07e3c1b77b3e84adb80a28375658bb517d49 cc1d683c47620bf3f460096270db103d26300905 b4387fbb996be884259c7615a411ac04e16bb349 b6e2af6fa0633639e3c68e431f4de3416218df00 318d2b98f4f5e5a9f3e89e40a1526f5ba310e613 a16745ed2856170647bcfc0a5d5e9e159cc5b5e8 87ad76ef3a2c938a42493ab1003857e4b52e92ba 2f3d0bac30dedb4c74b199f36d5ab1c8f4e8888f c4d389ccc9d5a052011649d5972a9d9c7cd72c67 8c35cf1a6eb99524fa3f9eac2dadd14d5ccce6da af1ca798e79c3a559fc8c6c06e015aa8d07fd113 798b06c140af403c0e280ebcdcc0f2ac7fccf5f6 00eb30d61779430441ea66adc7b591c96ff8ee2b 156975bef5c64c27d5a4df207a3b7fa98ce933a3 0930b630a8dc6f130653be4783c78329f8e144d8 02dbed4973f53a17f384482c152216e3ad829046 e03c45a24e8786405780ae4e0d5d0681e15eb4e7 aa1d865cd90045688b73875451bc9bddfba6636b 10f2a81c2141c994505bac6f0eb2d95ccc57121f
Checks run (2 succeeded)
- Change Summary:
-
Added support for pydiffx and created test cases. Addressed issues logged.
- Commits:
-
Summary ID 622bd97c692a5d19caae495823376b8cd233c6c5 b77a7aec6879e99921707ca3539374b6175e34d6 c0515acf1111028bfc17ee798e843acf18ded18c 5bcb68b609c9a7eb1dce1c6c1a9015579fb117d6 a787bc38006b09645758ea678caa37d80ce3e35d 9ac91d774f655263e4ac081b24880a3450cb835e 2ebb07e3c1b77b3e84adb80a28375658bb517d49 cc1d683c47620bf3f460096270db103d26300905 b4387fbb996be884259c7615a411ac04e16bb349 b6e2af6fa0633639e3c68e431f4de3416218df00 318d2b98f4f5e5a9f3e89e40a1526f5ba310e613 a16745ed2856170647bcfc0a5d5e9e159cc5b5e8 87ad76ef3a2c938a42493ab1003857e4b52e92ba 2f3d0bac30dedb4c74b199f36d5ab1c8f4e8888f c4d389ccc9d5a052011649d5972a9d9c7cd72c67 8c35cf1a6eb99524fa3f9eac2dadd14d5ccce6da af1ca798e79c3a559fc8c6c06e015aa8d07fd113 798b06c140af403c0e280ebcdcc0f2ac7fccf5f6 00eb30d61779430441ea66adc7b591c96ff8ee2b 156975bef5c64c27d5a4df207a3b7fa98ce933a3 0930b630a8dc6f130653be4783c78329f8e144d8 02dbed4973f53a17f384482c152216e3ad829046 e03c45a24e8786405780ae4e0d5d0681e15eb4e7 aa1d865cd90045688b73875451bc9bddfba6636b 10f2a81c2141c994505bac6f0eb2d95ccc57121f 622bd97c692a5d19caae495823376b8cd233c6c5 b77a7aec6879e99921707ca3539374b6175e34d6 c0515acf1111028bfc17ee798e843acf18ded18c 5bcb68b609c9a7eb1dce1c6c1a9015579fb117d6 a787bc38006b09645758ea678caa37d80ce3e35d 9ac91d774f655263e4ac081b24880a3450cb835e 2ebb07e3c1b77b3e84adb80a28375658bb517d49 cc1d683c47620bf3f460096270db103d26300905 b4387fbb996be884259c7615a411ac04e16bb349 b6e2af6fa0633639e3c68e431f4de3416218df00 318d2b98f4f5e5a9f3e89e40a1526f5ba310e613 a16745ed2856170647bcfc0a5d5e9e159cc5b5e8 87ad76ef3a2c938a42493ab1003857e4b52e92ba 2f3d0bac30dedb4c74b199f36d5ab1c8f4e8888f c4d389ccc9d5a052011649d5972a9d9c7cd72c67 8c35cf1a6eb99524fa3f9eac2dadd14d5ccce6da af1ca798e79c3a559fc8c6c06e015aa8d07fd113 798b06c140af403c0e280ebcdcc0f2ac7fccf5f6 00eb30d61779430441ea66adc7b591c96ff8ee2b 156975bef5c64c27d5a4df207a3b7fa98ce933a3 0930b630a8dc6f130653be4783c78329f8e144d8 02dbed4973f53a17f384482c152216e3ad829046 e03c45a24e8786405780ae4e0d5d0681e15eb4e7 aa1d865cd90045688b73875451bc9bddfba6636b 10f2a81c2141c994505bac6f0eb2d95ccc57121f 8c632cf4a6b77613e4e211b7c6724e0813af40aa
Checks run (2 succeeded)
- Description:
-
Add an option to the
rbt diff
command toapply basic colorization to the output. The rbt diff --color-diff
command highlightsremoved lines in red and added lines in green. This review request includes the following:
- Utilizing pygments library, format the diff displayed
on terminal with basic colorization.
- Add
--color-diff
option torbt diff
command.
+ + - Utilizing pygments library, format the diff displayed