8000 Remove code for sphinx < 1.8 · matplotlib/matplotlib@8c67cce · GitHub
[go: up one dir, main page]

Skip to content

Commit 8c67cce

Browse files
committed
Remove code for sphinx < 1.8
1 parent b5d4a6c commit 8c67cce

File tree

2 files changed

+2
-11
lines changed

2 files changed

+2
-11
lines changed

doc/conf.py

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -101,10 +101,7 @@ def _check_dependencies():
101101
autosummary_generate = True
102102

103103
autodoc_docstring_signature = True
104-
if sphinx.version_info < (1, 8):
105-
autodoc_default_flags = ['members', 'undoc-members']
106-
else:
107-
autodoc_default_options = {'members': None, 'undoc-members': None}
104+
autodoc_default_options = {'members': None, 'undoc-members': None}
108105

109106
# missing-references names matches sphinx>=3 behavior, so we can't be nitpicky
110107
# for older sphinxes.
@@ -345,10 +342,7 @@ def _check_dependencies():
345342
# If false, no module index is generated.
346343
latex_use_modindex = True
347344

348-
if hasattr(sphinx, 'version_info') and sphinx.version_info[:2] >= (1, 4):
349-
latex_toplevel_sectioning = 'part'
350-
else:
351-
latex_use_parts = True
345+
latex_toplevel_sectioning = 'part'
352346

353347
# Show both class-level docstring and __init__ docstring in class
354348
# documentation

lib/matplotlib/sphinxext/mathmpl.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -118,9 +118,6 @@ def depart_latex_math_latex(self, node):
118118
latex=(visit_latex_math_latex, depart_latex_math_latex))
119119
app.add_role('mathmpl', math_role)
120120
app.add_directive('mathmpl', MathDirective)
121-
if sphinx.version_info < (1, 8):
122-
app.add_role('math', math_role)
123-
app.add_directive('math', MathDirective)
124121

125122
metadata = {'parallel_read_safe': True, 'parallel_write_safe': True}
126123
return metadata

0 commit comments

Comments
 (0)
0