@@ -230,6 +230,20 @@ def tutorials_download_error(record):
230
230
autodoc_docstring_signature = True
231
231
autodoc_default_options = {'members' :None ,'undoc-members' :None }
232
232
233
+
234
+ def autodoc_process_bases (app ,name ,obj ,options ,bases ):
235
+ """
236
+ Hide pybind11 base object from inheritance tree.
237
+
238
+ Note, *bases* must be modified in place.
239
+ """
240
+ for cls in bases [:]:
241
+ if not isinstance (cls ,type ):
242
+ continue
243
+ if cls .__module__ == 'pybind11_builtins' and cls .__name__ == 'pybind11_object' :
244
+ bases .remove (cls )
245
+
246
+
233
247
# make sure to ignore warnings that stem from simply inspecting deprecated
234
248
# class-level attributes
235
249
warnings .filterwarnings ('ignore' ,category = DeprecationWarning ,
@@ -847,5 +861,6 @@ def setup(app):
847
861
bld_type = 'rel'
848
862
app .add_config_value ('skip_sub_dirs' ,0 ,'' )
849
863
app .add_config_value ('releaselevel' ,bld_type ,'env' )
864
+ app .connect ('autodoc-process-bases' ,autodoc_process_bases )
850
865
if sphinx .version_info [:2 ]< (7 ,1 ):
851
866
app .connect ('html-page-context' ,add_html_cache_busting ,priority = 1000 )