Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

ovynnej
Copy link
Contributor

@ovynnej ovynnej commented Oct 2, 2021

Reference Issues/PRs

Addresses #20308.

What does this implement/fix? Explain your changes.

I made fixes to the docstrings in _label_propagation.py, but one test might still be failling.

Any other comments?

Running python3 -m numpydoc sklearn.semi_supervised.LabelPropagation --validate gave me three errors before my fixes and no errors now.

Running pytest maint_tools/test_docstrings.py -k LabelPropagation- gave me many errors before my fixes and now gives me one error: RT03: Return value has no description.

image

This seems to be the problem:

        Returns
        -------
        self : object

I tried changing self : object (which is at lines 261 and 486) to the following things:

  • self : object.
  • self : The return value is the object.

...because I thought maybe it wanted a period at the end, or a longer statement, but I got the same error whenever I ran pytest maint_tools/test_docstrings.py -k LabelPropagation- again.

I'd be grateful for help!

@jmloyola
Copy link
Member

jmloyola commented Oct 2, 2021

@ovynnej to fix that you have to add the descriptions of the return value. For example something like this could work:

        """
        Returns
        -------
        self : object
            Fitted estimator.
        """

Nevertheless, there was another person working on the same estimator (PR) that is waiting for review. Maybe you didn't see the message in the issue because there are too many comments there. Try to choose a different estimator if you can.

@ovynnej
Copy link
Contributor Author

ovynnej commented Oct 2, 2021

@jmloyola thank you for your helpful feedback and explanation. I will pick a different estimator and check more carefully that it isn't redundant.

@ovynnej ovynnej closed this Oct 2, 2021
@ovynnej ovynnej deleted the LabelPropagation-docstring branch October 2, 2021 16:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants