gokart
gokart copied to clipboard
mypy: Allow ChoiceParameter to set Literal Type
Expected
T = Literal["foo", "bar"]
t: T = luigi.ChoiceParameter(choices=typing.get_args(T), var_type=str) # ok
Actual
T = Literal["foo", "bar"]
t: T = luigi.ChoiceParameter(choices=typing.get_args(T), var_type=str) # mypy: error