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

Checking if item is in configuration #97

Closed
NickG123 opened this issue Oct 4, 2016 · 1 comment
Closed

Checking if item is in configuration #97

NickG123 opened this issue Oct 4, 2016 · 1 comment
Labels

Comments

@NickG123
Copy link
Contributor

NickG123 commented Oct 4, 2016

It appears that contains is not overridden in ConfigTree, so checking for the existence of a key does not work if it is dot-separated:

>>> from pyhocon import ConfigFactory
>>> t = ConfigFactory.from_dict({"test": {"test": 1}})
>>> "test.test" in t
False
>>> t.get_int("test.test")
1
@darthbear
Copy link
Member

Thanks for reporting that issue @NickG123. Just implemented it and pushed it to pyhocon==0.3.35. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants