summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/util/langhelpers.py
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sqlalchemy/util/langhelpers.py')
-rw-r--r--lib/sqlalchemy/util/langhelpers.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/sqlalchemy/util/langhelpers.py b/lib/sqlalchemy/util/langhelpers.py
index 7e9906028..bd670f2cc 100644
--- a/lib/sqlalchemy/util/langhelpers.py
+++ b/lib/sqlalchemy/util/langhelpers.py
@@ -223,7 +223,7 @@ def %(name)s(%(args)s):
"Inherited from :func:`sqlalchemy%s`; this constructor "
"creates a :class:`%s` object"
% (linked_to_location, class_location),
- 0,
+ 1,
)
decorated.__doc__ = linked_to_doc
else:
@@ -1637,6 +1637,8 @@ def _dedent_docstring(text):
def inject_docstring_text(doctext, injecttext, pos):
doctext = _dedent_docstring(doctext or "")
lines = doctext.split("\n")
+ if len(lines) == 1:
+ lines.append("")
injectlines = textwrap.dedent(injecttext).split("\n")
if injectlines[0]:
injectlines.insert(0, "")