-
-
Notifications
You must be signed in to change notification settings - Fork 25.8k
FIX Fixes test for checking gitignore and Cython templates #20997
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
It's weird that our CI did not fail though... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the PR @gaborkertesz !
This looks good. Small comment on implementation.
ignored_files = open(gitignore_file, "r").readlines() | ||
ignored_files = list(map(lambda line: line.strip("\n"), ignored_files)) | ||
ignored_files = list( | ||
map(lambda line: pathlib.Path(line.strip("\n")), ignored_files) | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since we are now comparing paths, may we include the following update to fully use the pathlib
api?
ignored_files = gitignore_file.read_text().split("\n")
ignored_files = [pathlib.Path(line) for line in ignored_files]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great finding, thanks, applied!
Converting to string removed the windows compatible path.
In the title the "gitnore" is a typo of "gitignore" or it's an abbreviation @thomasjpfan? |
Good catch! (It was a typo) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Converting to string removed the windows compatible path.
Reference Issues/PRs
Fixes #20996 20996
What does this implement/fix? Explain your changes.
Removing string conversion and comparing objects by assert.
Any other comments?