USDA-ARS-NWRC / inicheck

Automated handling, checking, and outputting of complicated .ini configuration files.
Other
1 stars 4 forks source link

allow_none parsing bug in entries.py #63

Closed micahjohnson150 closed 3 years ago

micahjohnson150 commented 3 years ago

Description

In testing the Config Entries I found that allowing_none is interpreted as a bool only when 'false' is passed. Otherwise 'true' 'True' are actually stored as the original string. This is due to Line 188 in entries.py

What I Did

>>> from inicheck.entries import ConfigEntry
>>> c = ConfigEntry(parseable_line=["allow_none = True"])
>>> c.allow_none
'True'
>>> c = ConfigEntry(parseable_line=["allow_none = true"])
>>> c.allow_none
'true'
>>> c = ConfigEntry(parseable_line=["allow_none = False"])
>>> c.allow_none
False