fix some keys will be ignored!#54
Open
sudor wants to merge 2 commits into
Open
Conversation
eg: list_keys[i] = a.b.c and list_keys[i + 1]=a.b.cx, the key 'a.b.c' would be ignored!
Owner
|
thanks for the PR @sudor , do you mind writing a test to show the intended behavior? |
fsramalho
suggested changes
May 22, 2020
| for i, item in enumerate(list_keys): | ||
| if i != len(list_keys) - 1: | ||
| if not list_keys[i + 1].startswith(list_keys[i]): | ||
| if not list_keys[i + 1].startswith(list_keys[i]+'.'): |
There was a problem hiding this comment.
This only accounts when separator=.. I think it should be if not list_keys[i + 1].startswith(list_keys[i]+separator):
amirziai
requested changes
May 27, 2020
amirziai
left a comment
Owner
There was a problem hiding this comment.
needs a test to show the intended behavior
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.
eg: list_keys[i] = a.b.c and list_keys[i + 1]=a.b.cx, the key 'a.b.c' would be ignored!
Summary
The summary should expand on the title of the pull request. What is the expected effect of the
pull request? Specifically, indicate how the behavior will be different than before the pull
request.
Bug Fixes/New Features
How to Verify
How can reviewers verify the request has the intended effect? This should include descriptions of
any new tests that are added or old tests that are updated. It should also indicate how the code
was tested.
Side Effects
Does the pull request contain any side effects? This should list non-obvious things that have
changed in the request.
Resolves
Fixes RID-1234
Fixes AMG-1234
Tests
What tests were created or changed for this feature or fix? Do all tests pass, and if not, why?
Code Reviewer(s)
@, @