python-patch
python-patch copied to clipboard
Library to parse and apply unified diffs
Hi, thanks for a very nice and useful library. It doesn't seem like it's been maintained for a while though (last commit to master was more than 1 year ago,...
should be bytes, not textmode
If you run with the --debug flag in Python 3 then the script exits because p.source and p.target are bytes rather than string.
Made the minimal amount of changes to make it work for python 3.8.0, should work fine in all python 3, can't test in python 2 (my initial idea was to...
Given `a.txt`: ``` 1 2 3 ``` and `broken.patch` (note that it's missing the third line of context): ``` --- a.txt 2019-03-28 17:02:04.832004033 -0700 +++ b.txt 2019-03-28 17:02:34.999576803 -0700 @@...
* This import of module shutil is redundant, as it was previously imported on line 35. * Testing for None should use the 'is' operator. * The value assigned to...
line.strip('\r\n') contains '\r'.
Fixes