Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitf87e9f4

Browse files
committed
Update doc/conf.py to avoid warnings with (future) sphinx 1.8.
- sphinx 1.8 activates math by default; don't use mathmpl in that case (to avoid a duplicate-role warning) (mathmpl may be later deprecated once we depend on sphinx 1.8 for the doc build)sphinx-doc/sphinx#4975- sphinx 1.8 introduced autodoc_default_options to replace autodoc_default_flagssphinx-doc/sphinx#5315- sphinx 1.6 deprecated app.info in favor of a logging API, but we don't really need either anywayshttp://www.sphinx-doc.org/en/master/changes.html#id52
1 parent7b5ff33 commitf87e9f4

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

‎doc/conf.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,14 +37,15 @@
3737
'IPython.sphinxext.ipython_directive',
3838
'numpydoc',# Needs to be loaded *after* autodoc.
3939
'sphinx_gallery.gen_gallery',
40-
'matplotlib.sphinxext.mathmpl',
4140
'matplotlib.sphinxext.plot_directive',
4241
'sphinxext.custom_roles',
4342
'sphinxext.github',
4443
'sphinxext.math_symbol_table',
4544
'sphinxext.mock_gui_toolkits',
4645
'sphinxext.skip_deprecated',
4746
]
47+
ifsphinx.version_info< (1,8):
48+
extensions.append('matplotlib.sphinxext.mathmpl')
4849

4950
exclude_patterns= ['api/api_changes/*','users/whats_new/*']
5051

@@ -84,7 +85,10 @@ def _check_deps():
8485
autosummary_generate=True
8586

8687
autodoc_docstring_signature=True
87-
autodoc_default_flags= ['members','undoc-members']
88+
ifsphinx.version_info< (1,8):
89+
autodoc_default_flags= ['members','undoc-members']
90+
else:
91+
autodoc_default_options= {'members':None,'undoc-members':None}
8892

8993
intersphinx_mapping= {
9094
'python': ('https://docs.python.org/3',None),

‎doc/sphinxext/github.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,6 @@ def ghissue_role(name, rawtext, text, lineno, inliner, options={}, content=[]):
7575
prb=inliner.problematic(rawtext,rawtext,msg)
7676
return [prb], [msg]
7777
app=inliner.document.settings.env.app
78-
#app.info('issue %r' % text)
7978
if'pull'inname.lower():
8079
category='pull'
8180
elif'issue'inname.lower():
@@ -105,7 +104,6 @@ def ghuser_role(name, rawtext, text, lineno, inliner, options={}, content=[]):
105104
:param content: The directive content for customization.
106105
"""
107106
app=inliner.document.settings.env.app
108-
#app.info('user link %r' % text)
109107
ref='https://www.github.com/'+text
110108
node=nodes.reference(rawtext,text,refuri=ref,**options)
111109
return [node], []
@@ -126,7 +124,6 @@ def ghcommit_role(name, rawtext, text, lineno, inliner, options={}, content=[]):
126124
:param content: The directive content for customization.
127125
"""
128126
app=inliner.document.settings.env.app
129-
#app.info('user link %r' % text)
130127
try:
131128
base=app.config.github_project_url
132129
ifnotbase:
@@ -146,7 +143,6 @@ def setup(app):
146143
147144
:param app: Sphinx application context.
148145
"""
149-
app.info('Initializing GitHub plugin')
150146
app.add_role('ghissue',ghissue_role)
151147
app.add_role('ghpull',ghissue_role)
152148
app.add_role('ghuser',ghuser_role)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp