Skip to content

Clean up text distance code for diffs.#34

Open
fickas wants to merge 4 commits intomainfrom
fickas-patch-1
Open

Clean up text distance code for diffs.#34
fickas wants to merge 4 commits intomainfrom
fickas-patch-1

Conversation

@fickas
Copy link
Contributor

@fickas fickas commented Mar 5, 2023

See in particular the changes I made to patterns.py.

Linked to issue #35

Some diffs have a + or - followed immediately with a part of the line. I changed the code to check for things like ++ or --. But +def, etc. is ok. Also, I am not so sure about the check if the line length is >1. I have seen single + or -, e.g., +\n or -\n. When you split into lines, you get a single + or -. Don't these represent newlines being added or deleted?
@fickas fickas requested a review from brnorris03 March 5, 2023 22:37
Trying to make process_single_commit smarter about parsing changes. As noted in a comment, there still is a kluge with single + or - not followed by any text. I believe these represent the adding or deleting of blank lines in the file, e.g., for whitespace readability. I am adding a dummy space following these types of changes to they are not lost.
@fickas fickas changed the title Fickas patch 1 Clean up text distance code for diffs. Mar 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant