-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Norm path before compare #11719
Norm path before compare #11719
Conversation
Would you mind investigating using pathlib.Path for this block of code instead? It should allow more succinct code for the same logic. |
e67d631
to
52a6318
Compare
hm, the failing tests looks unrelated this PR to me, or? |
Looks like the CI stack had some (hopefully temporary) downtime. |
04bcf51
to
9f02064
Compare
@lorddavidiii Thanks for filing this PR and for exploring the migration of this function to pathlib! ^.^ I've rebased this PR on I think the pathlib variant is harder to read and follow than the original function. We can discuss any "should this change to pathlib" related concerns there. |
This PR norms the paths before checking, if the installed scripts are on
PATH
. I got wrong warnings, when the PATH contains something like/a/./bin
instead of/a/bin
.I also add a small test for this, contains all the cases from the os.path.normpath() docs. I am not sure, if this works also on windows
and I am also not sure, if I should add a news fragment, as this is just a small change.