File tree 2 files changed +3
-18
lines changed
2 files changed +3
-18
lines changed Original file line number Diff line number Diff line change 15
15
from datetime import date
16
16
import sys
17
17
import os
18
- import re
19
18
20
19
21
20
# If extensions (or modules to document with autodoc) are in another directory,
46
45
'numpydoc' ,
47
46
'sphinx.ext.ifconfig' ,
48
47
'sphinx.ext.viewcode' ,
48
+ 'sphinx.ext.imgmath' ,
49
49
]
50
50
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
-
58
51
# Add any paths that contain templates here, relative to this directory.
59
52
templates_path = ['_templates' ]
60
53
81
74
# version = .__version__
82
75
# The full version, including alpha/beta/rc tags.
83
76
release = 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__
86
78
numpydoc_xref_param_type = True
87
79
numpydoc_xref_ignore = {'optional' , 'type_without_description' , 'BadException' }
88
80
# 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):
244
244
get_doc_object = get_doc_object_
245
245
246
246
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 )
255
248
app .connect ('autodoc-process-docstring' , mangle_docstrings )
256
249
app .connect ('autodoc-process-signature' , mangle_signature )
257
250
app .connect ('doctree-read' , relabel_references )
You can’t perform that action at this time.
0 commit comments