elegant-park-52418
04/16/2024, 3:26 PMBoolOption
class MySubsystem(Subsystem):
test = BoolOption(
default=None,
help=softwrap("test"),
advanced=False,
)
From the doc string, I expect the default value to be None , but I'm seeing False instead. From the help output:
--[no-]mysubsystem-test
PANTS_MYSUBSYSTEM_TEST
test
default: None
current value: False
test
Any insight would be appreciated.happy-kitchen-89482
04/16/2024, 10:09 PMdefault= entirely?happy-kitchen-89482
04/16/2024, 10:09 PMelegant-park-52418
04/17/2024, 1:51 PMelegant-park-52418
04/17/2024, 3:08 PMException message: __new__() missing 1 required keyword-only argument: 'default'
NoneType: Nonecareful-address-89803
04/17/2024, 5:24 PMTriBoolFieldelegant-park-52418
04/17/2024, 6:18 PMcareful-address-89803
04/17/2024, 6:21 PMelegant-park-52418
04/17/2024, 7:12 PMNone , i can use the is_flagged method to check if a value was supplied.happy-kitchen-89482
04/17/2024, 8:28 PMelegant-park-52418
04/17/2024, 8:56 PMelegant-park-52418
04/17/2024, 8:57 PMhappy-kitchen-89482
04/17/2024, 11:48 PMelegant-park-52418
04/18/2024, 2:11 PMelegant-park-52418
04/18/2024, 2:31 PMwide-midnight-78598
04/18/2024, 3:01 PMpants.option.parserwide-midnight-78598
04/18/2024, 3:02 PMUnsetBool anywhere, but yeah.... I feel like this should be documented 🙂wide-midnight-78598
04/18/2024, 3:03 PMUnsetBool breaks typing though. Needs some type loveelegant-park-52418
04/18/2024, 7:22 PM