Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
beat.backend.python
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
beat
beat.backend.python
Commits
909d5aa8
Commit
909d5aa8
authored
4 years ago
by
André Anjos
Browse files
Options
Downloads
Patches
Plain Diff
[doc] Change configuration to enforce autodoc options
parent
1e8e9f1a
No related branches found
No related tags found
1 merge request
!80
Updates to Sphinx 3.2.x
Pipeline
#45148
failed
4 years ago
Stage: build
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
doc/conf.py
+5
-28
5 additions, 28 deletions
doc/conf.py
with
5 additions
and
28 deletions
doc/conf.py
+
5
−
28
View file @
909d5aa8
...
@@ -228,11 +228,11 @@ rst_epilog = """
...
@@ -228,11 +228,11 @@ rst_epilog = """
# Default processing flags for sphinx
# Default processing flags for sphinx
autoclass_content
=
"
class
"
autoclass_content
=
"
class
"
autodoc_member_order
=
"
bysource
"
autodoc_member_order
=
"
bysource
"
autodoc_default_
flag
s
=
[
autodoc_default_
option
s
=
{
"
members
"
,
"
members
"
:
True
,
"
undoc-members
"
,
"
undoc-members
"
:
True
,
"
show-inheritance
"
,
"
show-inheritance
"
:
True
,
]
}
if
"
BOB_DOCUMENTATION_SERVER
"
not
in
os
.
environ
:
if
"
BOB_DOCUMENTATION_SERVER
"
not
in
os
.
environ
:
# notice we need to overwrite this for BEAT projects - defaults from Bob are
# notice we need to overwrite this for BEAT projects - defaults from Bob are
...
@@ -252,26 +252,3 @@ else:
...
@@ -252,26 +252,3 @@ else:
# Adds simplejson, pyzmq links
# Adds simplejson, pyzmq links
intersphinx_mapping
[
"
http://simplejson.readthedocs.io/en/stable/
"
]
=
None
intersphinx_mapping
[
"
http://simplejson.readthedocs.io/en/stable/
"
]
=
None
intersphinx_mapping
[
"
http://pyzmq.readthedocs.io/en/stable/
"
]
=
None
intersphinx_mapping
[
"
http://pyzmq.readthedocs.io/en/stable/
"
]
=
None
# 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 private 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
)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment