Skip to content
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

Fix nested key plus default bug, fix typo in README.md, bump version #39

Merged

Conversation

SparkeyG
Copy link
Contributor

No description provided.

gestalt/__init__.py Outdated Show resolved Hide resolved
@@ -395,15 +395,18 @@ def __get(
)
split_keys = key.split(self.__delim_char)
consider_keys = list()
config_val = None
for split_key in split_keys:
consider_keys.append(split_key)
joined_key = self.__delim_char.join(consider_keys)
config_val = self._get_config_for_key(key=key,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmm, does the self._get_config_for_key call here not return the default value ever? At least thats what i'm inferring from your additional logic on line 406.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The problem here is that it returns the default value at the first val, given 'test.foo' and a default, it will never return the value of 'test.foo' always the default.

@SparkeyG SparkeyG force-pushed the sparkeyg/issue-38/nested-key-default-fix branch 2 times, most recently from 6e09ef1 to fb2f0b9 Compare October 18, 2023 18:55
@adisunw adisunw merged commit db16f6f into clear-street:master Oct 19, 2023
2 checks passed
@SparkeyG SparkeyG deleted the sparkeyg/issue-38/nested-key-default-fix branch October 19, 2023 15:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants