Page MenuHome

PyDoc: Fix 90% of sphinx-build warnings
AbandonedPublic

Authored by Aaron Carlisle (Blendify) on Wed, Oct 7, 6:19 PM.

Details

Summary

This is a second attempt at rB953c232db31f1a76f99ceb43119681ce0df1ab17 which got reverted

Changes:

  • Document bpy.ops.* as classes and not modules (bpy.ops is still a module). Changes here were also made to increase the indent to reduce the documentation scope (sphinx was complaining because two class functions were the same). -- Does not fix errors but makes the doc structure match bpy.types and is more correct.
  • Use .. currentmodule:: instead of .. module for bpy.types and bpy.ops see https://www.sphinx-doc.org/en/master/usage/restructuredtext/domains.html#directive-py-currentmodule -- This change fixes most of the errors
  • Change the bpy data module from .. module:: bpy to`.. module:: bpy.data` -- fixes one warning

These changes were tested to insure the urls and xrefs were the same (see rBaead4b3cab472b96fa0e07c289979c28f5fc22a5)

Total errors went from 1263 to 120. The remaining errors regarding duplicate object descriptions are a bit harder to fix.

Diff Detail

Repository
rB Blender
Branch
arcpatch-D9139 (branched from master)
Build Status
Buildable 10629
Build 10629: arc lint + arc unit

Event Timeline

Aaron Carlisle (Blendify) requested review of this revision.Wed, Oct 7, 6:19 PM
Aaron Carlisle (Blendify) created this revision.
Aaron Carlisle (Blendify) edited the summary of this revision. (Show Details)
Aaron Carlisle (Blendify) retitled this revision from PyDoc: Fix 90% of errors to PyDoc: Fix 90% of sphinx-build warnings.Wed, Oct 7, 6:30 PM
  • Fix ops indent
  • Fix class links
  • Fix subclass links
  • Merge branch 'master' into arcpatch-D9139
  • Merge branch 'master' into arcpatch-D9139
  • Less intusive change using currentmodule syntax
  • Use current module for fake structs
  • Add bpy.ops and bpy.types modules to index files
  • Merge branch 'master' into arcpatch-D9139
  • Merge branch 'master' into arcpatch-D9139
Campbell Barton (campbellbarton) edited the summary of this revision. (Show Details)
  • Merge branch 'master' into arcpatch-D9139 after applying part of this patch

Committed rBfb20efae5965: PyDoc: fix most of the sphinx-build warnings.

re:

Does not fix errors but makes the doc structure match bpy.types and is more correct.

I'm not sure why the operator changes are needed or how it's more correct. bpy.ops.* are intended to behave like modules (update, they're now real-modules - rB79840abf6d58af1dab801f4e5718bca0df4ad1a9)..

Also, I quickly checked some of the remaining warnings about duplicates, Bone.children for example should be resolved in the API, as we don't need access to multiple children properties.

Okay thanks for explaining how ops work. These changes are not needed then.