Message349353
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 |
|
Date |
User |
Action |
Args |
2019-08-10 18:59:04 | Anthony Sottile | set | recipients:
+ Anthony Sottile |
2019-08-10 18:59:04 | Anthony Sottile | set | messageid: <1565463544.19.0.692436897534.issue37810@roundup.psfhosted.org> |
2019-08-10 18:59:04 | Anthony Sottile | link | issue37810 messages |
2019-08-10 18:59:04 | Anthony Sottile | create | |
|