Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
?
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
GitHub fields:
assignee = 'https://github.com/tim-one' closed_at = <Date 2019-08-21.20:26:10.221> created_at = <Date 2019-08-10.18:59:04.158> labels = ['3.8', 'library', '3.9'] title = 'ndiff reports incorrect location when diff strings contain tabs' updated_at = <Date 2019-08-21.20:26:10.220> user = 'https://github.com/asottile'
bugs.python.org fields:
activity = <Date 2019-08-21.20:26:10.220> actor = 'tim.peters' assignee = 'tim.peters' closed = True closed_date = <Date 2019-08-21.20:26:10.221> closer = 'tim.peters' components = ['Library (Lib)'] creation = <Date 2019-08-10.18:59:04.158> creator = 'Anthony Sottile' dependencies = [] files = [] hgrepos = [] issue_num = 37810 keywords = ['patch'] message_count = 3.0 messages = ['349353', '349354', '349391'] nosy_count = 3.0 nosy_names = ['tim.peters', 'rhettinger', 'Anthony Sottile'] pr_nums = ['15201', '15365'] priority = 'normal' resolution = 'fixed' stage = 'resolved' status = 'closed' superseder = None type = None url = 'https://bugs.python.org/issue37810' versions = ['Python 3.8', 'Python 3.9']
The text was updated successfully, but these errors were encountered:
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
Sorry, something went wrong.
This seems like a reasonable suggestion to me. Am not sure whether it should be backported.
Tim, what do you think?
That's actually a good point, I don't think this should land in python3.7 since it changes outuput -- I'm removing that from the versions (though the bug does affect every version I have access to)
tim-one
No branches or pull requests
?
hint in diff output when dealing with tabs #15201?
hint in diff output when dealing with tabs (GH-15201) #15365Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: