An early guard in get_child_node raises a ValueError if an empty or None input is given.
Given that the method returns an Optional[ParseNode], this is unnecessary, since it can just return None without breaking any documented behavior.
Besides this, it breaks auto-generated code which calls get_child_node("") when there is no discriminator which is why I marked it as Bug.
The proposed solution is to simply remove that guard.
An early guard in
get_child_noderaises aValueErrorif an empty or None input is given.Given that the method returns an
Optional[ParseNode], this is unnecessary, since it can just returnNonewithout breaking any documented behavior.Besides this, it breaks auto-generated code which calls
get_child_node("")when there is no discriminator which is why I marked it as Bug.The proposed solution is to simply remove that guard.