You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Replace None with '' for added/deleted files
Let mylist = ['b', 'a', 'c', None]. In Python2 `sorted(mylist)`
returns `[None, 'a', 'b', 'c']. In Python3 `sorted(mylist)` errors
out because you can't compare a `None` to strings. Because of this
difference I chose to replace `None` with `''` for files which have
been added or deleted. It still makes sense logically because the path
to the file is non-existent so `''` and the name of the file is `''`.
* Had to add mode='rb' to file `open()`
* Using binaryornot package because it handles the python2/python3
differences in how to specify the characters to remove when checking
if file is binary
* Some general code clean up of shadowed variables, unused
modules/variables etc.
0 commit comments