8000 Get correct source code link for decorated functions by StefRe · Pull Request #22044 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content

Get correct source code link for decorated functions #22044

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
Dec 23, 2021

Conversation

StefRe
Copy link
Contributor
@StefRe StefRe commented Dec 23, 2021

for sphinx.ext.linkcode

PR Summary

For decorated functions, get the source code of the decorated function instead of the decorator.

Closes #22039.

The source link of the example from the issue MicrosecondLocator.set_data_interval points to the correct function now.

PR Checklist

Tests and Styling

  • Has pytest style unit tests (and pytest passes). --> I didn't include a test as linkcode_resolve was uncovered before.
  • Is Flake 8 compliant (install flake8-docstrings and run flake8 --docstring-convention=all).

Documentation

  • [N/A] New features are documented, with examples if plot related.
  • [N/A] New features have an entry in doc/users/next_whats_new/ (follow instructions in README.rst there).
  • [N/A] API changes documented in doc/api/next_api_changes/ (follow instructions in README.rst there).
  • Documentation is sphinx and numpydoc compliant (the docs should build without error).

@tacaswell tacaswell added this to the v3.5.2 milestone Dec 23, 2021
@tacaswell
Copy link
Member

Well, that was far easier to fix than I expected (I was worried we would have to write inspect.unwrap)!

@timhoffm timhoffm merged commit 4497aa7 into matplotlib:main Dec 23, 2021
meeseeksmachine pushed a commit to meeseeksmachine/matplotlib that referenced this pull request Dec 23, 2021
@StefRe StefRe deleted the fix/issue22039 branch December 23, 2021 21:14
tacaswell added a commit that referenced this pull request Dec 23, 2021
…044-on-v3.5.x

Backport PR #22044 on branch v3.5.x (Get correct source code link for decorated functions)
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.

[Doc]: [source] link for deprecated functions leads to _api/deprecation.py
3 participants
0