Skip to content

Commit

Permalink
docs: format (#28593)
Browse files Browse the repository at this point in the history
  • Loading branch information
efriis authored Dec 6, 2024
1 parent f943205 commit 925ca75
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions docs/api_reference/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,14 +87,15 @@ def run(self):
def setup(app):
app.add_directive("example_links", ExampleLinksDirective)
app.add_directive("beta", Beta)
app.connect('autodoc-skip-member', skip_private_members)
app.connect("autodoc-skip-member", skip_private_members)


def skip_private_members(app, what, name, obj, skip, options):
if skip:
return True
if hasattr(obj, '__doc__') and obj.__doc__ and ':private:' in obj.__doc__:
if hasattr(obj, "__doc__") and obj.__doc__ and ":private:" in obj.__doc__:
return True
if name == '__init__' and obj.__objclass__ is object:
if name == "__init__" and obj.__objclass__ is object:
# dont document default init
return True
return None
Expand Down

0 comments on commit 925ca75

Please sign in to comment.