Skip to content

DOC: Fix quotes position in Timestamp and Timedelta #24243

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

Closed
wants to merge 12 commits into from
Closed

DOC: Fix quotes position in Timestamp and Timedelta #24243

wants to merge 12 commits into from

Conversation

diogo-bastos
Copy link

The validate_docstrings.py validator was returning errors for methods with no comments. I only worked on the methods that already had comments in this PR.

@pep8speaks
Copy link

pep8speaks commented Dec 11, 2018

Hello @diogo-bastos! Thanks for updating the PR.

Comment last updated on December 11, 2018 at 22:39 Hours UTC

Copy link
Contributor

@jreback jreback left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lots of alignment issues with quotes

"""
return a casting of the unit represented to nanoseconds
round the fractional part of a float to our precision, p
"""
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is not aligned here

int64_t value # nanoseconds
object freq # frequency reference
bint is_populated # are my components populated
int64_t value
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

huh? this is so much harder to read, just revert this

@datapythonista
Copy link
Member

@diogo-bastos some extra information that it was probably not clear in the issue description.

The goal of the issue is to fix the format of the docstrings, and leave them consistent everywhere. For a specific subset of docstrings.

So, regarding the issue, the only change needed is to make sure the The opening and closing quotes are correctly aligned.

So, as the issue says, this is correct:

def foo():
    """
    Summary of the docstring.

    Returns
    -------
    str
        Explaining what is being returned.
    """

and any other variation is not:

def foo():
    """    Summary of the docstring.

    Returns
    -------
    str
        Explaining what is being returned.
    """

or

def foo():
    """
       Summary of the docstring.

    Returns
    -------
    str
        Explaining what is being returned.
                """

etc.

And only for the docstrings reported by the script. So, the call to the script in the issue doesn't report any case once this is finished.

For this PR we don't expect any change to the code, change to other docstrings, change to the content of the docstrings or any unrelated change. If you think something else needs to be changed, open an issue, wait for the discussion on whether it's a good idea, and then open a separate PR specific to that issue. We need to do this to keep pandas development under control, be able to easily revert changes, and not have a chaos where we can't react to something breaking.

The only other thing that would be acceptable as part of this PR, would be to capitalize the summary and add a period at the end.

So, for example:

def foo():
    """ summary of the docstring """

could become

def foo():
    """
    Summary of the docstring.
    """

I'm going to close this for now, as I'm not sure if it'll be easier for you to start again in a new PR, or fix this. Feel free to reopen when you have the correct changes, or open a new PR.

Thanks a lot for working on this.

@diogo-bastos
Copy link
Author

Hello @datapythonista , thank you for your feedback and patience. I will open a new PR with the correct changes soon.

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

Successfully merging this pull request may close these issues.

4 participants