Skip to content

Commit

Permalink
Fix docstring
Browse files Browse the repository at this point in the history
  • Loading branch information
romainthomas committed Jul 23, 2023
1 parent ce75ff3 commit 54ec80a
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions doc/sphinx/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,14 @@ def _on_process_signature(app, what: str, name: str, obj: Any,

return signature, return_annotation

def _autodoc_process_docstring(app, what, name, obj, options, lines: list[str]):
if len(lines) > 2 or len(lines) == 0:
return
line = lines[0]

if line.startswith("(self)"):
lines[:] = []
return

def setup(app):
app.add_css_file('css/custom.css') # may also be an URL
Expand All @@ -251,6 +259,7 @@ def setup(app):
app.add_role('github_user', github_user)

app.connect('autodoc-process-signature', _on_process_signature)
app.connect('autodoc-process-docstring', _autodoc_process_docstring)

linkcheck_request_headers = {
"*": {
Expand Down

0 comments on commit 54ec80a

Please sign in to comment.