Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

python-unidiff requires to separate diff to lines #42

Open
cool-RR opened this issue Feb 26, 2017 · 1 comment
Open

python-unidiff requires to separate diff to lines #42

cool-RR opened this issue Feb 26, 2017 · 1 comment

Comments

@cool-RR
Copy link

cool-RR commented Feb 26, 2017

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.

@matiasb
Copy link
Owner

matiasb commented May 20, 2017

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants