Since the convert function is called before the choice verification, the Literal options are parsed with value only (and rightly so).
This however introduces a problem in the __contains__, where the check happens: enums should be checked against their name, while literals using the value. To avoid weird edge cases, we check values only even in the case of Enum.
Since the
convert
function is called before the choice verification, theLiteral
options are parsed with value only (and rightly so). This however introduces a problem in the__contains__
, where the check happens: enums should be checked against their name, while literals using the value. To avoid weird edge cases, we check values only even in the case ofEnum
.