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

#412 Add path validation in untracked files processing #413

Merged

Conversation

MihailPereverza
Copy link
Contributor

Fixes #412

@MihailPereverza
Copy link
Contributor Author

MihailPereverza commented Jul 15, 2024

I've implemented a function _get_file_lines that emulates the behavior of self._git_diff(), which returns an empty list for binary files. Additionally, the function _validate_path_to_diff leverages the basic path validation mechanisms used in self._git_diff() to ensure consistency.

@Bachmann1234
Copy link
Owner

This is looking alright. Can you add a test and make sure to run isort and black?

@MihailPereverza MihailPereverza marked this pull request as ready for review July 17, 2024 19:29
@MihailPereverza
Copy link
Contributor Author

Yes, it's ready. I have added the tests and ran the linters using the script poetry run bash -x verify.sh.

@Bachmann1234
Copy link
Owner

Alright, lets get this out there. Thanks for the PR!

@Bachmann1234 Bachmann1234 merged commit 14434d3 into Bachmann1234:main Jul 18, 2024
7 checks passed
@Bachmann1234
Copy link
Owner

Released https://pypi.org/project/diff-cover/9.1.1/ Thanks again!

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.

UnicodeDecodeError when an untracked binary file is present in the repository
2 participants