DiffSK / configobj

Python 3+ compatible port of the configobj library
https://configobj.readthedocs.org
Other
322 stars 76 forks source link

Members with min and or max values should not be allowed to be None #218

Open claudiodsf opened 2 years ago

claudiodsf commented 2 years ago

Currently, a member specification like the following:

keyword = float(min=0, max=1, default=0.5)

will pass validation when setting keyword = None.

I have therefore to check this afterwards in my code.

I was wondering, whether this could be implemented within ConfigObj.

More generally, there could be an option for allowing/disallowing None values, e.g.,

keyword = float(allow_none=False)