Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
bob
bob.learn.tensorflow
Commits
7b676965
Commit
7b676965
authored
Nov 10, 2020
by
Amir MOHAMMADI
Browse files
Sphinx 3 autodoc no longer accepts autodoc_default_flags and autodoc_default_options should be used
parent
7d18e045
Pipeline
#45505
failed with stages
in 3 minutes and 19 seconds
Changes
1
Pipelines
3
Hide whitespace changes
Inline
Side-by-side
doc/conf.py
View file @
7b676965
...
...
@@ -233,11 +233,11 @@ rst_epilog = """
# Default processing flags for sphinx
autoclass_content
=
"class"
autodoc_member_order
=
"bysource"
autodoc_default_
flag
s
=
[
"members"
,
"undoc-members"
,
"show-inheritance"
,
]
autodoc_default_
option
s
=
{
"members"
:
True
,
"undoc-members"
:
True
,
"show-inheritance"
:
True
,
}
sphinx_requirements
=
"extra-intersphinx.txt"
...
...
@@ -249,24 +249,3 @@ else:
intersphinx_mapping
=
link_documentation
()
# We want to remove all private (i.e. _. or __.__) members
# that are not in the list of accepted functions
accepted_private_functions
=
[
"__array__"
]
def
member_function_test
(
app
,
what
,
name
,
obj
,
skip
,
options
):
# test if we have a private function
if
len
(
name
)
>
1
and
name
[
0
]
==
"_"
:
# test if this private function should be allowed
if
name
not
in
accepted_private_functions
:
# omit privat functions that are not in the list of accepted private functions
return
skip
else
:
# test if the method is documented
if
not
hasattr
(
obj
,
"__doc__"
)
or
not
obj
.
__doc__
:
return
skip
return
False
def
setup
(
app
):
app
.
connect
(
"autodoc-skip-member"
,
member_function_test
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment