Skip to content

Cleanup cruft #371

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 30, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 2 additions & 10 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
from datetime import date
import sys
import os
import re


# If extensions (or modules to document with autodoc) are in another directory,
Expand Down Expand Up @@ -46,15 +45,9 @@
'numpydoc',
'sphinx.ext.ifconfig',
'sphinx.ext.viewcode',
'sphinx.ext.imgmath',
]

try:
import sphinx.ext.imgmath # noqa
except ImportError:
extensions.append('sphinx.ext.pngmath')
else:
extensions.append('sphinx.ext.imgmath')

# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']

Expand All @@ -81,8 +74,7 @@
# version = .__version__
# The full version, including alpha/beta/rc tags.
release = numpydoc.__version__
version = re.sub(r'(\d+\.\d+)\.\d+(.*)', r'\1\2', numpydoc.__version__)
version = re.sub(r'(\.dev\d+).*?$', r'\1', version)
version = numpydoc.__version__
numpydoc_xref_param_type = True
numpydoc_xref_ignore = {'optional', 'type_without_description', 'BadException'}
# Run docstring validation as part of build process
Expand Down
9 changes: 1 addition & 8 deletions numpydoc/numpydoc.py
Original file line number Diff line number Diff line change
Expand Up @@ -254,14 +254,7 @@ def setup(app, get_doc_object_=get_doc_object):
get_doc_object = get_doc_object_

app.setup_extension('sphinx.ext.autosummary')

# Once we bump our Sphinx requirement higher (1.7 or 1.8?)
# we can just connect to config-inited
try:
app.connect('config-inited', update_config)
except ExtensionError:
app.connect('builder-inited', update_config)

app.connect('config-inited', update_config)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

app.connect('autodoc-process-docstring', mangle_docstrings)
app.connect('autodoc-process-signature', mangle_signature)
app.connect('doctree-read', relabel_references)
Expand Down