Author Anthony Sottile
Recipients Anthony Sottile
Date 2019-08-10.18:59:03
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1565463544.19.0.692436897534.issue37810@roundup.psfhosted.org>
In-reply-to
Content
Here's an example

from difflib import ndiff


def main():
    x = '\tx\t=\ty\n\t \t \t^'
    y = '\tx\t=\ty\n\t \t \t^\n'
    print('\n'.join(
        line.rstrip('\n') for line in
        ndiff(x.splitlines(True), y.splitlines(True)))
    )


if __name__ == '__main__':
    exit(main())


Current output:

$ python3.8 t.py
  	x	=	y
- 	 	 	^
+ 	 	 	^
? 	     +


Expected output:

$ ./python t.py
  	x	=	y
- 	 	 	^
+ 	 	 	^
? 	 	 	 +


Found this while implementing a similar thing for flake8 here: https://gitlab.com/pycqa/flake8/merge_requests/339 and while debugging with pytest
History
Date User Action Args
2019-08-10 18:59:04Anthony Sottilesetrecipients: + Anthony Sottile
2019-08-10 18:59:04Anthony Sottilesetmessageid: <1565463544.19.0.692436897534.issue37810@roundup.psfhosted.org>
2019-08-10 18:59:04Anthony Sottilelinkissue37810 messages
2019-08-10 18:59:04Anthony Sottilecreate