summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJarrod Millman <jarrod.millman@gmail.com>2022-08-15 08:27:00 -0700
committerGitHub <noreply@github.com>2022-08-15 11:27:00 -0400
commitd50e1f81063648c8c4d09820c6d013db1e3757cf (patch)
tree1db50da02753d39666f40e870d94e31bbc3fc462
parentdcbfbc44ba01feddef62f294abf66581497f5828 (diff)
downloadnumpydoc-d50e1f81063648c8c4d09820c6d013db1e3757cf.tar.gz
Remove numpydoc_use_blockquotes (#422)
* Remove numpydoc_use_blockquotes See https://github.com/numpy/numpydoc/pull/107 * Update docstring
-rw-r--r--doc/install.rst4
-rw-r--r--numpydoc/docscrape_sphinx.py10
-rw-r--r--numpydoc/numpydoc.py2
-rw-r--r--numpydoc/tests/test_docscrape.py46
-rw-r--r--numpydoc/tests/test_numpydoc.py1
5 files changed, 2 insertions, 61 deletions
diff --git a/doc/install.rst b/doc/install.rst
index a0bc076..976ddd5 100644
--- a/doc/install.rst
+++ b/doc/install.rst
@@ -48,10 +48,6 @@ numpydoc_citation_re : str
should be mangled to avoid conflicts due to
duplication across the documentation. Defaults
to ``[\w-]+``.
-numpydoc_use_blockquotes : bool
- Until version 0.8, parameter definitions were shown as blockquotes, rather
- than in a definition list. If your styling requires blockquotes, switch
- this config option to True. This option will be removed in version 0.10.
numpydoc_attributes_as_param_list : bool
Whether to format the Attributes section of a class page in the same way
as the Parameter section. If it's False, the Attributes section will be
diff --git a/numpydoc/docscrape_sphinx.py b/numpydoc/docscrape_sphinx.py
index ee8e093..9a62cff 100644
--- a/numpydoc/docscrape_sphinx.py
+++ b/numpydoc/docscrape_sphinx.py
@@ -26,7 +26,6 @@ class SphinxDocString(NumpyDocString):
def load_config(self, config):
self.use_plots = config.get("use_plots", False)
- self.use_blockquotes = config.get("use_blockquotes", False)
self.class_members_toctree = config.get("class_members_toctree", True)
self.attributes_as_param_list = config.get("attributes_as_param_list", True)
self.xref_param_type = config.get("xref_param_type", False)
@@ -84,8 +83,6 @@ class SphinxDocString(NumpyDocString):
if not param.desc:
out += self._str_indent([".."], 8)
else:
- if self.use_blockquotes:
- out += [""]
out += self._str_indent(param.desc, 8)
out += [""]
return out
@@ -180,8 +177,7 @@ class SphinxDocString(NumpyDocString):
"""Generate RST for a listing of parameters or similar
Parameter names are displayed as bold text, and descriptions
- are in blockquotes. Descriptions may therefore contain block
- markup as well.
+ are in definition lists.
Parameters
----------
@@ -217,9 +213,7 @@ class SphinxDocString(NumpyDocString):
parts.append(param_type)
out += self._str_indent([" : ".join(parts)])
- if desc and self.use_blockquotes:
- out += [""]
- elif not desc:
+ if not desc:
# empty definition
desc = [".."]
out += self._str_indent(desc, 8)
diff --git a/numpydoc/numpydoc.py b/numpydoc/numpydoc.py
index 8fa4f0a..509f053 100644
--- a/numpydoc/numpydoc.py
+++ b/numpydoc/numpydoc.py
@@ -171,7 +171,6 @@ def mangle_docstrings(app, what, name, obj, options, lines):
cfg = {
"use_plots": app.config.numpydoc_use_plots,
- "use_blockquotes": app.config.numpydoc_use_blockquotes,
"show_class_members": app.config.numpydoc_show_class_members,
"show_inherited_class_members": show_inherited_class_members,
"class_members_toctree": app.config.numpydoc_class_members_toctree,
@@ -274,7 +273,6 @@ def setup(app, get_doc_object_=get_doc_object):
app.connect("doctree-read", relabel_references)
app.connect("doctree-resolved", clean_backrefs)
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)
app.add_config_value(
"numpydoc_show_inherited_class_members", True, True, types=(bool, dict)
diff --git a/numpydoc/tests/test_docscrape.py b/numpydoc/tests/test_docscrape.py
index 01447a0..55ccf92 100644
--- a/numpydoc/tests/test_docscrape.py
+++ b/numpydoc/tests/test_docscrape.py
@@ -1059,52 +1059,6 @@ def test_plot_examples():
assert str(doc).count("plot::") == 1, str(doc)
-def test_use_blockquotes():
- cfg = dict(use_blockquotes=True)
- doc = SphinxDocString(
- """
- Parameters
- ----------
- abc : def
- ghi
- jkl
- mno
-
- Returns
- -------
- ABC : DEF
- GHI
- JKL
- MNO
- """,
- config=cfg,
- )
- line_by_line_compare(
- str(doc),
- """
- :Parameters:
-
- **abc** : def
-
- ghi
-
- **jkl**
-
- mno
-
- :Returns:
-
- **ABC** : DEF
-
- GHI
-
- JKL
-
- MNO
- """,
- )
-
-
def test_class_members():
class Dummy:
"""
diff --git a/numpydoc/tests/test_numpydoc.py b/numpydoc/tests/test_numpydoc.py
index d414b1c..1629078 100644
--- a/numpydoc/tests/test_numpydoc.py
+++ b/numpydoc/tests/test_numpydoc.py
@@ -11,7 +11,6 @@ from sphinx.util import logging
class MockConfig:
numpydoc_use_plots = False
- numpydoc_use_blockquotes = True
numpydoc_show_class_members = True
numpydoc_show_inherited_class_members = True
numpydoc_class_members_toctree = True