Minor code quality improvements#235
Merged
olehermanse merged 5 commits intocfengine:masterfrom Jun 25, 2025
Merged
Conversation
37bce8d to
84fe212
Compare
olehermanse
reviewed
Jun 23, 2025
olehermanse
reviewed
Jun 23, 2025
olehermanse
requested changes
Jun 23, 2025
Member
olehermanse
left a comment
There was a problem hiding this comment.
Please rebase now that the related PRs are merged :)
larsewi
approved these changes
Jun 24, 2025
Contributor
larsewi
left a comment
There was a problem hiding this comment.
Thanks for working on this 🚀
| assert strip_left(s, "b") == "abab" | ||
|
|
||
|
|
||
| def test_read_file(): |
Contributor
There was a problem hiding this comment.
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
olehermanse
approved these changes
Jun 25, 2025
|
|
||
|
|
||
| def path_append(dir, subdir): | ||
| dir = os.path.abspath(os.path.expanduser(dir)) |
Member
There was a problem hiding this comment.
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().
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Depends on #234.