Closed
Description
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.