Skip to content
New issue

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

Linenum diffing refactor #28

Merged
merged 9 commits into from
Aug 6, 2020
Merged

Linenum diffing refactor #28

merged 9 commits into from
Aug 6, 2020

Conversation

akaihola
Copy link
Owner

Refactor the algorithm for finding the list of line numbers of modified lines. Moving it into a new EditedLinenumsDiffer class in darker.git. This is also in preparation for adding possible support for linters (like Mypy and Pylint).

akaihola added 6 commits July 9, 2020 00:25
An empty list of opcodes now results in an empty list of edited line
numbers.
`darker.git.EditedLinenumsDiffer` now handles
- retrieving HEAD version of a file
- comparing to a version of the file given as a string
- converting the resulting opcodes into a list of changed line numbers
- extending changed chunks with a given number of context lines
@akaihola akaihola added the enhancement New feature or request label Jul 14, 2020
@akaihola akaihola added this to the 1.1.0 milestone Jul 14, 2020
@akaihola akaihola mentioned this pull request Jul 30, 2020
@akaihola akaihola merged commit d15f8aa into master Aug 6, 2020
@akaihola akaihola deleted the linenum-diffing-refactor branch August 6, 2020 05:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants