File tree Expand file tree Collapse file tree 2 files changed +3
-18
lines changed
Expand file tree Collapse file tree 2 files changed +3
-18
lines changed Original file line number Diff line number Diff line change 1515from datetime import date
1616import sys
1717import os
18- import re
1918
2019
2120# If extensions (or modules to document with autodoc) are in another directory,
4645 'numpydoc' ,
4746 'sphinx.ext.ifconfig' ,
4847 'sphinx.ext.viewcode' ,
48+ 'sphinx.ext.imgmath' ,
4949]
5050
51- try :
52- import sphinx .ext .imgmath # noqa
53- except ImportError :
54- extensions .append ('sphinx.ext.pngmath' )
55- else :
56- extensions .append ('sphinx.ext.imgmath' )
57-
5851# Add any paths that contain templates here, relative to this directory.
5952templates_path = ['_templates' ]
6053
8174# version = .__version__
8275# The full version, including alpha/beta/rc tags.
8376release = numpydoc .__version__
84- version = re .sub (r'(\d+\.\d+)\.\d+(.*)' , r'\1\2' , numpydoc .__version__ )
85- version = re .sub (r'(\.dev\d+).*?$' , r'\1' , version )
77+ version = numpydoc .__version__
8678numpydoc_xref_param_type = True
8779numpydoc_xref_ignore = {'optional' , 'type_without_description' , 'BadException' }
8880# Run docstring validation as part of build process
Original file line number Diff line number Diff line change @@ -244,14 +244,7 @@ def setup(app, get_doc_object_=get_doc_object):
244244 get_doc_object = get_doc_object_
245245
246246 app .setup_extension ('sphinx.ext.autosummary' )
247-
248- # Once we bump our Sphinx requirement higher (1.7 or 1.8?)
249- # we can just connect to config-inited
250- try :
251- app .connect ('config-inited' , update_config )
252- except ExtensionError :
253- app .connect ('builder-inited' , update_config )
254-
247+ app .connect ('config-inited' , update_config )
255248 app .connect ('autodoc-process-docstring' , mangle_docstrings )
256249 app .connect ('autodoc-process-signature' , mangle_signature )
257250 app .connect ('doctree-read' , relabel_references )
You can’t perform that action at this time.
0 commit comments