Open
Conversation
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?
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See in particular the changes I made to patterns.py.
Linked to issue #35