Skip to content

Commit d50e1f8

Browse files
Remove numpydoc_use_blockquotes (#422)
* Remove numpydoc_use_blockquotes See #107 * Update docstring
1 parent dcbfbc4 commit d50e1f8

File tree

5 files changed

+2
-61
lines changed

5 files changed

+2
-61
lines changed

doc/install.rst

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,6 @@ numpydoc_citation_re : str
4848
should be mangled to avoid conflicts due to
4949
duplication across the documentation. Defaults
5050
to ``[\w-]+``.
51-
numpydoc_use_blockquotes : bool
52-
Until version 0.8, parameter definitions were shown as blockquotes, rather
53-
than in a definition list. If your styling requires blockquotes, switch
54-
this config option to True. This option will be removed in version 0.10.
5551
numpydoc_attributes_as_param_list : bool
5652
Whether to format the Attributes section of a class page in the same way
5753
as the Parameter section. If it's False, the Attributes section will be

numpydoc/docscrape_sphinx.py

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ def __init__(self, docstring, config=None):
2626

2727
def load_config(self, config):
2828
self.use_plots = config.get("use_plots", False)
29-
self.use_blockquotes = config.get("use_blockquotes", False)
3029
self.class_members_toctree = config.get("class_members_toctree", True)
3130
self.attributes_as_param_list = config.get("attributes_as_param_list", True)
3231
self.xref_param_type = config.get("xref_param_type", False)
@@ -84,8 +83,6 @@ def _str_returns(self, name="Returns"):
8483
if not param.desc:
8584
out += self._str_indent([".."], 8)
8685
else:
87-
if self.use_blockquotes:
88-
out += [""]
8986
out += self._str_indent(param.desc, 8)
9087
out += [""]
9188
return out
@@ -180,8 +177,7 @@ def _str_param_list(self, name, fake_autosummary=False):
180177
"""Generate RST for a listing of parameters or similar
181178
182179
Parameter names are displayed as bold text, and descriptions
183-
are in blockquotes. Descriptions may therefore contain block
184-
markup as well.
180+
are in definition lists.
185181
186182
Parameters
187183
----------
@@ -217,9 +213,7 @@ def _str_param_list(self, name, fake_autosummary=False):
217213
parts.append(param_type)
218214
out += self._str_indent([" : ".join(parts)])
219215

220-
if desc and self.use_blockquotes:
221-
out += [""]
222-
elif not desc:
216+
if not desc:
223217
# empty definition
224218
desc = [".."]
225219
out += self._str_indent(desc, 8)

numpydoc/numpydoc.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,6 @@ def mangle_docstrings(app, what, name, obj, options, lines):
171171

172172
cfg = {
173173
"use_plots": app.config.numpydoc_use_plots,
174-
"use_blockquotes": app.config.numpydoc_use_blockquotes,
175174
"show_class_members": app.config.numpydoc_show_class_members,
176175
"show_inherited_class_members": show_inherited_class_members,
177176
"class_members_toctree": app.config.numpydoc_class_members_toctree,
@@ -274,7 +273,6 @@ def setup(app, get_doc_object_=get_doc_object):
274273
app.connect("doctree-read", relabel_references)
275274
app.connect("doctree-resolved", clean_backrefs)
276275
app.add_config_value("numpydoc_use_plots", None, False)
277-
app.add_config_value("numpydoc_use_blockquotes", None, False)
278276
app.add_config_value("numpydoc_show_class_members", True, True)
279277
app.add_config_value(
280278
"numpydoc_show_inherited_class_members", True, True, types=(bool, dict)

numpydoc/tests/test_docscrape.py

Lines changed: 0 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1059,52 +1059,6 @@ def test_plot_examples():
10591059
assert str(doc).count("plot::") == 1, str(doc)
10601060

10611061

1062-
def test_use_blockquotes():
1063-
cfg = dict(use_blockquotes=True)
1064-
doc = SphinxDocString(
1065-
"""
1066-
Parameters
1067-
----------
1068-
abc : def
1069-
ghi
1070-
jkl
1071-
mno
1072-
1073-
Returns
1074-
-------
1075-
ABC : DEF
1076-
GHI
1077-
JKL
1078-
MNO
1079-
""",
1080-
config=cfg,
1081-
)
1082-
line_by_line_compare(
1083-
str(doc),
1084-
"""
1085-
:Parameters:
1086-
1087-
**abc** : def
1088-
1089-
ghi
1090-
1091-
**jkl**
1092-
1093-
mno
1094-
1095-
:Returns:
1096-
1097-
**ABC** : DEF
1098-
1099-
GHI
1100-
1101-
JKL
1102-
1103-
MNO
1104-
""",
1105-
)
1106-
1107-
11081062
def test_class_members():
11091063
class Dummy:
11101064
"""

numpydoc/tests/test_numpydoc.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111

1212
class MockConfig:
1313
numpydoc_use_plots = False
14-
numpydoc_use_blockquotes = True
1514
numpydoc_show_class_members = True
1615
numpydoc_show_inherited_class_members = True
1716
numpydoc_class_members_toctree = True

0 commit comments

Comments
 (0)