Skip to content
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

DOC: Remove incorrect periods at the end of parameter types #23597

Closed
datapythonista opened this issue Nov 9, 2018 · 0 comments · Fixed by #23600
Closed

DOC: Remove incorrect periods at the end of parameter types #23597

datapythonista opened this issue Nov 9, 2018 · 0 comments · Fixed by #23600
Milestone

Comments

@datapythonista
Copy link
Member

datapythonista commented Nov 9, 2018

There are around 20 functions and methods in pandas that have an invalid period at the end of the parameter types, as reported by ./scripts/validate_docstrings.py --errors=PR05:

pandas.read_clipboard: Parameter "sep" type should not finish with "."
pandas.Series.astype: Parameter "copy" type should not finish with "."
pandas.Series.astype: Parameter "errors" type should not finish with "."
pandas.Series.reorder_levels: Parameter "order" type should not finish with "."
pandas.Series.str.lstrip: Parameter "to_strip" type should not finish with "."
pandas.Series.str.match: Parameter "na" type should not finish with "."
pandas.Series.str.rstrip: Parameter "to_strip" type should not finish with "."
pandas.Series.str.strip: Parameter "to_strip" type should not finish with "."
pandas.DataFrame.astype: Parameter "copy" type should not finish with "."
pandas.DataFrame.astype: Parameter "errors" type should not finish with "."
pandas.Panel.astype: Parameter "copy" type should not finish with "."
pandas.Panel.astype: Parameter "errors" type should not finish with "."
pandas.RangeIndex: Parameter "start" type should not finish with "."
pandas.MultiIndex.sortlevel: Parameter "sort_remaining" type should not finish with "."
pandas.DatetimeIndex.to_series: Parameter "keep_tz" type should not finish with "."
pandas.api.types.is_dict_like: Parameter "obj" type should not finish with "."
pandas.api.types.is_file_like: Parameter "obj" type should not finish with "."
pandas.api.types.is_list_like: Parameter "obj" type should not finish with "."
pandas.api.types.is_named_tuple: Parameter "obj" type should not finish with "."
pandas.api.types.is_iterator: Parameter "obj" type should not finish with "."
pandas.api.types.is_re: Parameter "obj" type should not finish with "."
pandas.api.types.is_re_compilable: Parameter "obj" type should not finish with "."```

The idea is that this is correct:

def foo(param1):
    """
    Parameters
    ----------
    param1 : str
        Parameter 1 description.
    """

But this is what we have (not that in the second case, there is a period after str, which shouldn't be there).

def foo(param1):
    """
    Parameters
    ----------
    param1 : str.
        Parameter 1 description.

    """

We should remove the periods, and make sure that ./scripts/validate_docstrings.py --errors=PR05 does not report anything.

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

Successfully merging a pull request may close this issue.

2 participants