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

get_string modifies strings that look like boolean values #134

Closed
movermeyer opened this issue Oct 12, 2017 · 1 comment
Closed

get_string modifies strings that look like boolean values #134

movermeyer opened this issue Oct 12, 2017 · 1 comment

Comments

@movermeyer
Copy link
Contributor

Given the HOCON config:

my_string_value = "True"

and the following code:

from pyhocon import ConfigFactory
config = ConfigFactory.parse_file("test.conf")
print repr(config.get_string("my_string_value"))

You get the following output:

u'true'

When I expected it to output:

u'True'

The code for get_string has special handling for "True" and "False". This special handling should probably be moved to get_bool.

@movermeyer
Copy link
Contributor Author

movermeyer commented Oct 12, 2017

I'll be submitting a Pull Request for this in a bit. I just have to understand how this happened in the first place.

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

No branches or pull requests

1 participant