flake8
-
bot/reviewbot/processing/tests/test_file.py (Diff revision 1) Show all issues -
bot/reviewbot/processing/tests/test_file.py (Diff revision 1) F841 local variable 'docs_dir' is assigned to but never used
Review Request #12087 — Created Feb. 25, 2022 and submitted
Information | |
---|---|
chipx86 | |
ReviewBot | |
release-3.0.x | |
Reviewers | |
reviewbot | |
This introduces
File.apply_patch()
, which will apply patched file
content to the filesystem for full-repository tools. This takes care of
properly applying not just added/modified changes (which worked fine
before) but deleted, moved, and copied files (which didn't).In the future, we may want to switch this to applying a patch through
GNU patch, to take advanage of time-tested patching logic. For now,
that's not how Review Bot works, so we're mimicking the logic we most
need for our tools.
New unit tests pass.
bot/reviewbot/processing/tests/test_file.py (Diff revision 1) |
---|
bot/reviewbot/processing/tests/test_file.py (Diff revision 1) |
---|
F841 local variable 'docs_dir' is assigned to but never used
Removed unused variables.
Commits: |
|
|||||||||
---|---|---|---|---|---|---|---|---|---|---|
Diff: |
Revision 2 (+664 -18) |
Added the missing working directory to the call to
apply_patch()
.
Commits: |
|
|||||||||
---|---|---|---|---|---|---|---|---|---|---|
Diff: |
Revision 3 (+664 -18) |
Fixed incorrect setting of
patched_file_path
after patch.
Commits: |
|
|||||||||
---|---|---|---|---|---|---|---|---|---|---|
Diff: |
Revision 4 (+664 -18) |