-
-
Notifications
You must be signed in to change notification settings - Fork 94
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
String Enum type should be a union of literal instead of str #216
Comments
I assigned this issue to you. |
I think it is difficult to parse other RST files while processing the document. |
I would like to take a deeper look to implement it. |
Thank you. I'm wondering this should be done in transformer or analyzer phase. I think adding this feature into the transformer phase is much simpler and easy to maintenance in future. |
Description about the feature
In Blender API, there are enum string type, currently the type used is
str | int
and ideally should only bestr
(c.f. #213).Even better would be that the type is a union of possible literal string variant.
For example the return type of
bpy.types.Operator.execute()
isThe type would be
Literal["RUNNING_MODAL"] | Literal["CANCELLED"] | Literal["FINISHED"] | Literal["PASS_THROUGH"] | Literal["INTERFACE"]
.Are you willing to contribute about this feature. (Yes/No)
Yes
The text was updated successfully, but these errors were encountered: