You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Today, string enums are typed using Literal to allow specific values and None if the value is not set, which is OK. However, we also use str as an option, which allows any value and defeats the purpose of having types in the first place.
Today, string enums are typed using
Literal
to allow specific values andNone
if the value is not set, which is OK. However, we also usestr
as an option, which allows any value and defeats the purpose of having types in the first place.For example, see
wait_for
in https://elasticsearch-py.readthedocs.io/en/v8.13.1/api/ml.html#elasticsearch.client.MlClient.start_trained_model_deployment. The type isLiteral['fully_allocated', 'started', 'starting'] | str | None
which prevents any useful type checking. We should remove thestr
type.Note that this is different from #1691 which is about using Python classes for enums.
The text was updated successfully, but these errors were encountered: