Skip to content
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

BUG backreferences not working for functions if not imported directly #583

Closed
lucyleeow opened this issue Jan 1, 2020 · 0 comments · Fixed by #584
Closed

BUG backreferences not working for functions if not imported directly #583

lucyleeow opened this issue Jan 1, 2020 · 0 comments · Fixed by #584
Labels

Comments

@lucyleeow
Copy link
Contributor

Creation of mini-galleries with backreferences_dir and doc_module generates an empty rst file if you use a function in an example like this:

import package.module

package.module.my_fun()

It works if you directly import the function in the example:

from package.module import my_fun

my_fun()

or if you import the function in the __init__.py file of the package (i.e.:

from .module import (
    my_fun,
    )

Note that this is only for functions. Classes work fine in all cases.

Refer to sphinx-gallery/sample-project#1 (comment) for suggestion on how to fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant