Skip to content

Cosmetic and efficiency improvements to replace_referneces #132

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 26, 2017

Conversation

jnothman
Copy link
Member

I think this can be merged without review when green.

@jnothman
Copy link
Member Author

(But the lack of tests on this function makes me not entirely sure!)

lines[i] = lines[i].replace(sixu('[%s]_') % r,
sixu('[%s]_') % new_r)
lines[i] = lines[i].replace(sixu('.. [%s]') % r,
sixu('.. [%s]') % new_r)

reference_offset[0] += len(references)
reference_offset[0] += len(references)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note this means that the reference offset will in general be much smaller than it currently tends to be if only a small portion of docstrings have refs in them...

@jnothman jnothman merged commit 778fcc1 into numpy:master Oct 26, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant