Description
Describe the issue linked to the documentation
When a @Property is documented by a docstring and when the corresponding fitted attribute with the same name is also documented in the docstring of the class, the documentation only displays the first line of the docstring of the @Property. The name of the property is also not properly rendered.
For example estimators_samples_
of BaggingClassifier
is displayed like this in the documentation:
Although its docstring is:
And the docstring of the @property
is:
This was probably introduced here : #30989
Suggest a potential alternative/fix
One solution is to remove the docstring of the property, in which case the docstring of the attribute will be rendered properly. But it would have to be done in all such cases. I discovered it while working on RandomForestClassifier.feature_importances_ that suffers from the same issue.
Cc: @antoinebaker @lesteve What do you think would be the right way to document an attribute coming from a property?