-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
No docs generated for functools.partial functions #5211
Comments
For the reason, autodoc can't matching Documenter class for it. We have to fix its comparison rule. |
Fix #5211: autodoc: No docs generated for functools.partial functions
Fixed by #5305. |
Will this be fixed in 1.8? Still see the failure on windows, sphinx 1.8.1. |
@natedileas |
Subject: No docs appear for functions created via functools.partial
Problem
I have a module which includes some functions created using
functools.partial
and I would like to include those in my doc page. I've usedfunc.__doc__ = ...
to set the docstring for each partial function.When I generate the docs the partial functions are completely ignored. I've created a toy example below to reproduce the problem.
Procedure to reproduce the problem
I created a directory with this structure:
example/code.py
contains:I set up my python environment and
sphinx
usingconda
like this:I also modified the resulting
conf.py
to add 'sphinx.ext.napoleon' to the extensions being used to make sure it recognizes the Google style docstrings.Then I added this to
index.rst
:Error logs / results
Running
make html
gives the following outputThe resulting docs correctly display the docs for
my_func
, butpartial_func
is completely absent. It doesn't even appear as a function signature.I tried setting
:members: partial_func
inindex.rst
as well, but it still didn't appear.Environment info
conda list
on my test env:The text was updated successfully, but these errors were encountered: