Skip to content

Commit 20decf6

Browse files
Avoid sorting references by length while renaming
1 parent e2f6842 commit 20decf6

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

numpydoc/numpydoc.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,6 @@ def rename_references(app, what, name, obj, options, lines,
4747
if m:
4848
references.append(m.group(1))
4949

50-
# start renaming from the longest string, to avoid overwriting parts
51-
references.sort(key=lambda x: -len(x))
5250
if references:
5351
for i, line in enumerate(lines):
5452
for r in references:

0 commit comments

Comments
 (0)