Skip to content

Remove deprecated numpydoc_edit_link #372

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
6 changes: 0 additions & 6 deletions doc/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -134,9 +134,3 @@ numpydoc_validation_exclude : set
validation.
Only has an effect when docstring validation is activated, i.e.
``numpydoc_validation_checks`` is not an empty set.
numpydoc_edit_link : bool
.. deprecated:: 0.7.0

edit your HTML template instead

Whether to insert an edit link after docstrings.
11 changes: 0 additions & 11 deletions numpydoc/numpydoc.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,16 +196,6 @@ def mangle_docstrings(app, what, name, obj, options, lines):
logger.warning(msg)


if (app.config.numpydoc_edit_link and hasattr(obj, '__name__') and
obj.__name__):
if hasattr(obj, '__module__'):
v = dict(full_name=f"{obj.__module__}.{obj.__name__}")
else:
v = dict(full_name=obj.__name__)
lines += ['', '.. htmlonly::', '']
lines += [f' {x}' for x in
(app.config.numpydoc_edit_link % v).split("\n")]

# call function to replace reference numbers so that there are no
# duplicates
rename_references(app, what, name, obj, options, lines)
Expand Down Expand Up @@ -266,7 +256,6 @@ def setup(app, get_doc_object_=get_doc_object):
app.connect('autodoc-process-signature', mangle_signature)
app.connect('doctree-read', relabel_references)
app.connect('doctree-resolved', clean_backrefs)
app.add_config_value('numpydoc_edit_link', None, False)
app.add_config_value('numpydoc_use_plots', None, False)
app.add_config_value('numpydoc_use_blockquotes', None, False)
app.add_config_value('numpydoc_show_class_members', True, True)
Expand Down
1 change: 0 additions & 1 deletion numpydoc/tests/test_numpydoc.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ class MockConfig():
numpydoc_xref_aliases_complete = deepcopy(DEFAULT_LINKS)
numpydoc_xref_ignore = set()
templates_path = []
numpydoc_edit_link = False
numpydoc_citation_re = '[a-z0-9_.-]+'
numpydoc_attributes_as_param_list = True
numpydoc_validation_checks = set()
Expand Down