Update python API documentation to use double quotes for strings and single quotes for enums #97464
Labels
No Label
Meta
Good First Issue
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
Eevee & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds, Tests & Devices
Module
Python API
Module
Rendering & Cycles
Module
Sculpt, Paint & Texture
Module
User Interface
Module
VFX & Video
Priority
High
Priority
Low
Priority
Normal
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Information from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
3 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender-manual#97464
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
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?
In python API documentation in many places there are single quotes for strings.
Like UILayout.prop
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)
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.)
Added subscriber: @BlenderAmateur
Added subscriber: @iss
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 runningsphinx_doc_gen.py
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'
Added subscriber: @Blendify
Seems to be a bug in sphinx, reported upstream here: https://github.com/sphinx-doc/sphinx/issues/10957