Setting a default of nil has unexpected behavior for boolean types when generating python bindings
stephanbro opened this issue · comments
Stephan Brown commented
Code can describe this better than I can.
Message definition:
(|relay_closed|
:documentation "Set the state of the Flux relay.\
True - Relay closed, allows flux current to flow.\
False - Relay open, no flux current can flow."
:type :bool
:required nil,
:default nil))
Generated python bindings:
relay_closed: Optional[bool] = False
"""Set the state of the Flux relay.
True - Relay closed, allows flux current to flow.
False - Relay open, no flux current can flow."""
My desired behavior would change relay_closed: Optional[bool] = False
to be relay_closed: Optional[bool] = None
Mark Skilbeck commented
Fixed by #136