Skip to content

Commit 795f576

Browse files
committed
Make sure case when class + method docstrings are combined is not reprocessed
1 parent 8a7fa50 commit 795f576

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Diff for: numpydoc/numpydoc.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -63,11 +63,11 @@ def rename_references(app, what, name, obj, options, lines,
6363
reference_offset[0] += len(references)
6464

6565

66-
DEDUPLICATION_TAG = ['..', ' processed by numpydoc']
66+
DEDUPLICATION_TAG = ' !! processed by numpydoc !!'
6767

6868

6969
def mangle_docstrings(app, what, name, obj, options, lines):
70-
if lines[-len(DEDUPLICATION_TAG):] == DEDUPLICATION_TAG:
70+
if DEDUPLICATION_TAG in lines:
7171
return
7272

7373
cfg = {'use_plots': app.config.numpydoc_use_plots,
@@ -105,7 +105,7 @@ def mangle_docstrings(app, what, name, obj, options, lines):
105105
# duplicates
106106
rename_references(app, what, name, obj, options, lines)
107107

108-
lines += DEDUPLICATION_TAG
108+
lines += ['..', ' ' + DEDUPLICATION_TAG]
109109

110110

111111
def mangle_signature(app, what, name, obj, options, sig, retann):

0 commit comments

Comments
 (0)