Update python API documentation to use double quotes for strings and single quotes for enums #97464
In python API documentation in many places there are single quotes for strings.
prop(data, property, text='', text_ctxt='', translate=True, icon='NONE', expand=False, slider=False, toggle=- 1, icon_only=False, event=False, full_event=False, emboss=True, index=- 1, icon_value=0, invert_checkbox=False)
- text (string, (optional)) – Override automatic text of the item
- text_ctxt (string, (optional)) – Override automatic translation context of the given text
- translate (boolean, (optional)) – Translate the given text, when UI translation is enabled
- icon (enum in ['NONE', ...
Some use double quotes for strings UILayout.prop_with_popover
prop_with_popover(data, property,text="", text_ctxt="", translate=True, icon='NONE', icon_only=False, panel)
Since Best Practice: Conventions to follow for writing good scripts says "Use single quotes for enums, and double quotes for strings", I think it would look better if the documentation used double quotes for strings and single quotes only for enums.
Unless there is a reason why it's preferred to use single quotes for strings in prop but not prop_with_popover, which I may have missed.
(If someone reads this. Where is the python API documentation? I followed the guide Documentation project to get the documentation but couldn't find python API docs in there.)
This documentation is mostly automatically generated, though there is some hand written content. when you clone Blender git repo, it can be found in
doc\python_api\ and it is generated by running
To actual report - I am not sure how some properties use single and other double quotes, will have to check this, but since these are automatically generated, I would assume this stems from RNA property definitions so it's likely, that there is reason for this.
Changed status from 'Needs Triage' to: 'Confirmed'
Seems to be a bug in sphinx, reported upstream here: https://github.com/sphinx-doc/sphinx/issues/10957
No due date set.
No dependencies set.
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?