python-unidiff
python-unidiff copied to clipboard
python-unidiff requires to separate diff to lines
I have a diff file in a string in memory, and I tried to do unidiff.PatchSet(diff_contents)
but it failed. After investigating I realized that I need to do unidiff.PatchSet(diff_contents.readlines())
to make it work. It'll be nice if the readlines
call wouldn't be needed.
Well, the init method expects a file-like object, that's why. An option would be to have a from_string
class method to initialize from a string.