virtuald / pyhcl

HCL is a configuration language. pyhcl is a python parser for it.
Mozilla Public License 2.0
336 stars 60 forks source link

make sure the value is a boolean #21

Closed scottbelden closed 7 years ago

scottbelden commented 7 years ago

Currently the value being returned is still just the strings "true" and "false" rather than the booleans True and False.

virtuald commented 7 years ago

Won't this break backwards compat then?

scottbelden commented 7 years ago

Sorry, maybe I should have added a test to make it more clear. On 0.2.3:

python -c "import hcl; print hcl.__version__; print hcl.loads('foo {\nbar = false\nbaz = true}')"
0.2.3
{u'foo': {u'bar': False, u'baz': True}}

But on 0.3.2:

python -c "import hcl; print hcl.__version__; print hcl.loads('foo {\nbar = false\nbaz = true}')"
0.3.2
{u'foo': {u'bar': u'false', u'baz': u'true'}}
virtuald commented 7 years ago

Got it, released as 0.3.3