cscorley / whatthepatch

What The Patch!? -- A Python patch parsing library

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How `diff.changes` can become `None`?

xged opened this issue · comments

@xged here's how:

>>> next(whatthepatch.parse_patch('--- a\n+++ b\n '))
diff(header=header(index_path=None, old_path='a', old_version=None, new_path='b', new_version=None), changes=None, text='--- a\n+++ b\n \n')
>>> 

Yes, @graingert is correct.

Would it make more sense to initialize changes to an empty list?

Closing, no response