python-unidiff icon indicating copy to clipboard operation
python-unidiff copied to clipboard

Unified diff python parsing/metadata extraction library

Results 29 python-unidiff issues
Sort by recently updated
recently updated
newest added

Right now, code assumes `a/` and `b/` prefixes for the filenames being compared. Those prefixes could be different depending on: http://git-scm.com/docs/diff-config#Documentation/diff-config.txt-diffmnemonicPrefix

This is to add the Github Actions configuration file to help set up Github Actions for testing. This was originally submitted as pull request #83 that contains two changes 1....

File renames aren't handled properly because PatchedFile.path returns a source filename which doesn't exist after the operation. Probably it should return a target filename. https://github.com/matiasb/python-unidiff/blob/9a473c8ca2cc71614b6e1470019d30065941cafe/unidiff/patch.py#L369 Due to that, tools which...

Tried: ``` python >>> diff = requests.get('https://github.com/matiasb/python-unidiff/pull/3.diff').content.decode('utf-8') >>> p = PatchSet(diff) >>> p ``` I would expect some kind of error message, since this is very misleading (internally python-unidiff iterates...

## test case ```python def test1(self): import urllib.request from unidiff import PatchSet diff = urllib.request.urlopen('https://patch-diff.githubusercontent.com/raw/eXist-db/exist/pull/2644.patch') encoding = diff.headers.get_charsets()[0] patch = PatchSet(diff, encoding=encoding) ``` ## log ``` Traceback (most recent call...

There is a case unidiff cannot load the diff file that have the rename file, It outputs the error unknown trailling newline. For example, 'From 82dd164bbedcd025ef38a2fb374dd18b90c84828 Mon Sep 17 00:00:00...

Depreaction warning due to invalid escape sequences in Python 3.7 . https://github.com/asottile/pyupgrade/ can be used to resolve the warnings. ``` find . -iname '*py' | grep -Ev 'setup|rdf4|tool' | xargs...

The easy solution would be to strip out the colors before starting.

This makes it possible to run the tests from the source release. It would even be better to make the tests a subpackage of the unidiff main package. That would...

After removing files from a patch set, how can I serialize it back to file?