Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitb48c76e

Browse files
committed
DOC: Hide pybind11 base object from inheritance
1 parentb4aa039 commitb48c76e

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

‎doc/conf.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,20 @@ def tutorials_download_error(record):
230230
autodoc_docstring_signature=True
231231
autodoc_default_options= {'members':None,'undoc-members':None}
232232

233+
234+
defautodoc_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+
forclsinbases[:]:
241+
ifnotisinstance(cls,type):
242+
continue
243+
ifcls.__module__=='pybind11_builtins'andcls.__name__=='pybind11_object':
244+
bases.remove(cls)
245+
246+
233247
# make sure to ignore warnings that stem from simply inspecting deprecated
234248
# class-level attributes
235249
warnings.filterwarnings('ignore',category=DeprecationWarning,
@@ -847,5 +861,6 @@ def setup(app):
847861
bld_type='rel'
848862
app.add_config_value('skip_sub_dirs',0,'')
849863
app.add_config_value('releaselevel',bld_type,'env')
864+
app.connect('autodoc-process-bases',autodoc_process_bases)
850865
ifsphinx.version_info[:2]< (7,1):
851866
app.connect('html-page-context',add_html_cache_busting,priority=1000)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp