-
Notifications
You must be signed in to change notification settings - Fork 13
Minor code quality improvements #235
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
Minor code quality improvements #235
Conversation
37bce8d to
84fe212
Compare
olehermanse
left a comment
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.
Please rebase now that the related PRs are merged :)
larsewi
left a comment
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.
Thanks for working on this 🚀
| assert strip_left(s, "b") == "abab" | ||
|
|
||
|
|
||
| def test_read_file(): |
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.
Could add edge case where path is:
- not a regular file
- binary file
…brary implementations Signed-off-by: jakub-nt <175944085+jakub-nt@users.noreply.github.com>
Signed-off-by: jakub-nt <175944085+jakub-nt@users.noreply.github.com>
…` home directory so that \`path_append\` function name is not misleading Signed-off-by: jakub-nt <175944085+jakub-nt@users.noreply.github.com>
…ild step splitting Signed-off-by: jakub-nt <175944085+jakub-nt@users.noreply.github.com>
84fe212 to
5834964
Compare
Signed-off-by: jakub-nt <175944085+jakub-nt@users.noreply.github.com>
5834964 to
4a75a94
Compare
|
|
||
|
|
||
| def path_append(dir, subdir): | ||
| dir = os.path.abspath(os.path.expanduser(dir)) |
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.
It's okay to make this change here, however we might reverse it in the future. It does seem useful that path_ functions do some sensible normalizations of the paths, especially the expanduser one - ~/ can cause stuff to break in unexpected ways. Now it's just a wrapper of os.path.join().
Depends on #234.