File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -557,6 +557,12 @@ def on_init(app): # pylint: disable=unused-argument
557557 # If we are, assemble the path manually
558558 bin_path = os .path .abspath (os .path .join (sys .prefix , "bin" ))
559559 apidoc_path = os .path .join (bin_path , apidoc_path )
560+
561+ # Set SPHINX_APIDOC_OPTIONS to add :no-index: to generated automodule directives
562+ # This prevents duplicate object warnings for re-exported API members
563+ env = os .environ .copy ()
564+ env ['SPHINX_APIDOC_OPTIONS' ] = 'members,show-inheritance,undoc-members,no-index'
565+
560566 check_call (
561567 [
562568 apidoc_path ,
@@ -565,7 +571,8 @@ def on_init(app): # pylint: disable=unused-argument
565571 os .path .join (root_path , "openedx_authz" ),
566572 os .path .join (root_path , "openedx_authz/migrations" ),
567573 os .path .join (root_path , "openedx_authz/tests" ),
568- ]
574+ ],
575+ env = env
569576 )
570577
571578
You can’t perform that action at this time.
0 commit comments