-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Replace os.path.sep.join
path manipulations with a helper
#2446
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.
The reason we have this (and don't use pathlib) is iirc pathlib has issues on windows, no? As a result we use os here as it's device/os agnostic.
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update. |
To the best of my knowledge, Besides, |
cc @BenjaminBossan as well, I guess? |
AFAIK, there are no issues with Anyway, I like the solution. The question is probably if we want to rely more on |
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.
@BenjaminBossan personally I'm a much bigger fan of pathlib, just letting your big PR's sit a day or two as I mull it over as they are quite large changes 😅
Well, as said, the repository is already mixing and matching There's a Ruff lint family |
Yes, for sure :) If Zach is in favor of |
This looks to have broken quite a few tests. Looking into it now
|
What does this PR do?
os.path.sep.join
itself is a bit of an antipattern (os.path.join
is the function generally meant for joining path components), but it was really used in N repeated places to get a path relative to the package's root.This PR cleans those up to a simple helper (that returns a modern
pathlib.Path
to boot).Before submitting
Pull Request section?
to it if that's the case.
documentation guidelines, and
here are tips on formatting docstrings.