-
-
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
regression in 3.1.0: docstring of ...:1:duplicate object description of ..., other instance in ..., use :noindex: for one of them #7817
Comments
It seems |
Hi @tk0miya ! Thanks a lot for your reply!
Yes, indeed. But it is the correct way to document properties in numpy convention. Please refer to
|
You should not add a docstring to |
@tk0miya Many thanks for the proposed workarounds! Can you please clarify what's the problem to follow |
There are no problem to follow the numpy guide. That is a misunderstanding. Only what I said is you have written a document for |
I don't think so, because |
The numpy guide only says the docstring of |
Unfortunately, it is not an option due to
It should be no conflicts in case |
Hmm... Okay, I'll reconsider this again (for 3.2). So I keep this open for a while. |
I reconsider this. If you'd like to write attributes to the docstring of class (or
Then the attributes are only described in the docstring of the class (or Note: This approach is better for this case. But it does not work properly at this moment. Because autodoc considers properties are kind of methods now. We have a plan to change the behavior in (nearly) future. After that, it will be resolved via customized autosummary template, I believe. I'll check my idea will really work well after the update. This is a rough implementation of my idea:
|
I have experienced this bug as well, but would like some clarification. Is this for attributes documented in In the numpy example I am getting the same duplicate object description warning listing attribute names in the class's Attributes section, and documenting them in the |
I am currently facing the same issue:
Generates the same duplication warning. If I change to Is there now a way to fix this and still follow the numpydoc convention? |
Since sphinx cannot handle `Attributes` section of `dataclass` correctly, we decided not to use `dataclass`. Ref: sphinx-doc/sphinx#7817 (comment)
+1, Is there a workaround ? |
Describe the bug
Incompatibility with
numpy
docstring convention.To Reproduce
Toy example:
conf.py
:index.rst
:Python-API.rst
:..\python-package\lightgbm\sklearn.py
:Expected behavior
No warnings.
Your project
https://github.com/microsoft/LightGBM/blob/master/docs/conf.py
Environment info
OS: Linux and Win
Python version: any
Sphinx version: 3.1.0
Sphinx extensions: in
conf.py
aboveExtra tools: -
https://travis-ci.org/github/microsoft/LightGBM/jobs/696395266#L634
The text was updated successfully, but these errors were encountered: