Added 3 new methods to the URL class#45
Open
RealA10N wants to merge 3 commits intocodeinthehole:masterfrom
Open
Added 3 new methods to the URL class#45RealA10N wants to merge 3 commits intocodeinthehole:masterfrom
RealA10N wants to merge 3 commits intocodeinthehole:masterfrom
Conversation
codeinthehole
requested changes
Apr 12, 2021
Owner
codeinthehole
left a comment
There was a problem hiding this comment.
Sorry for taking ages to notice this PR.
New methods seem sensible but could you add some tests for them?
| segments = self.path_segments() | ||
| for value in values: | ||
| segments += (to_unicode(value),) | ||
| return self.path_segments(segments) |
Owner
There was a problem hiding this comment.
We could loop over values and call self.add_path_segment on each right?
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.
First of all, I love this project! It saved me time on my projects, a couple of times already.
However, while using it I thought to myself that there is someplace to improve it.
Added 3 new methods:
add_path_segments: To add multiple path segments to the URL at once, instead of using theadd_path_segmentmethod multiple times.append_query_params: The same concept - to add multiple query parameters at once.remove_query_params: To remove multiple query parameters at once.I have also updated the README file to save you some work 😊
Please check my documentation, comments, and docstrings! I tried to follow the original format and syntax, but I'm pretty sure I failed at that 😅