Fix formatting of Layers docstrings
@@ -46,14 +46,12 @@ def _merge_docstrings(add_method, layer_string):
import textwrap
add_method_doc = _NumpyDocString(add_method.__doc__)
- params = (
- "\n".join(add_method_doc._str_param_list('Parameters')) + _VIEW_PARAMS
- )
+
# this ugliness is because the indentation of the parsed numpydocstring
# is different for the first parameter :(
- lines = params.splitlines()
+ lines = add_method_doc._str_param_list('Parameters')
lines = lines[:3] + textwrap.dedent("\n".join(lines[3:])).splitlines()
- params = "\n".join(lines)
+ params = "\n".join(lines) + "\n" + textwrap.dedent(_VIEW_PARAMS)
n = 'n' if layer_string.startswith(tuple('aeiou')) else ''
return _doc_template.format(n=n, layer_string=layer_string, params=params)
