Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
It currently just skips __init__ like the old one did Refs #9624
- Loading branch information
1 parent
ea99dc5
commit f080956
Showing
2 changed files
with
26 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
""" | ||
Mantid customizations for the behaviour of the Sphinx autodoc | ||
extension | ||
""" | ||
|
||
def skip(app, what, name, obj, skip, options): | ||
""" | ||
Arguments: | ||
app: Sphinx application object | ||
what: the type of the object which the docstring belongs to (one of "module", "class", "exception", "function", "method", "attribute") | ||
name: the fully qualified name of the object | ||
obj: the object itself | ||
skip: a boolean indicating if autodoc will skip this member if the user handler does not override the decision | ||
options: the options given to the directive: an object with attributes inherited_members, undoc_members, | ||
show_inheritance and noindex that are true if the flag option of same name was given to the auto directive | ||
""" | ||
if name == "__init__": | ||
return False | ||
return skip | ||
|
||
def setup(app): | ||
# Define which methods are skipped when running autodoc | ||
# on a member | ||
app.connect("autodoc-skip-member", skip) |