-
-
Notifications
You must be signed in to change notification settings - Fork 18.7k
Closed
Labels
Milestone
Description
We started to validate the formats of docstrings. For example, we expect that the summary of the docstring starts in the next line of the opening """
(see #24059).
In some cases the docstrings are generated dynamically, and in the case of _field_accessor
, we have to write some line breaks to avoid the validation to fail, for example:
_field_accessor('year', 'Y', "\n The year of the datetime\n")
In this issue we should update the code of _field_accessor
, and modify the calls to it removing the line breaks, so the previous example becomes:
_field_accessor('year', 'Y', 'The year of the datetime')
And the docstring is composed in a way that follows our docstring standards. The standards can be checked with:
$ ./scripts/validate_docstrings.py --prefix=pandas.Series --errors=GL01,GL02
which, it should report no error (or if it reports cases that are not fixed yet, the number of errors should decrease or not increase after the change).