Skip to content

DOC: Fix GL01 and GL02 errors in the docstrings #27988

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

Merged
merged 10 commits into from
Aug 24, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 25 additions & 12 deletions pandas/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,18 +123,22 @@ def ip():

@pytest.fixture(params=[True, False, None])
def observed(request):
""" pass in the observed keyword to groupby for [True, False]
"""
Pass in the observed keyword to groupby for [True, False]
Copy link
Member

Choose a reason for hiding this comment

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

I think need a blank line separating short description from long description here

This indicates whether categoricals should return values for
values which are not in the grouper [False / None], or only values which
appear in the grouper [True]. [None] is supported for future compatibility
if we decide to change the default (and would need to warn if this
parameter is not passed)"""
parameter is not passed).
"""
return request.param


@pytest.fixture(params=[True, False, None])
def ordered_fixture(request):
"""Boolean 'ordered' parameter for Categorical."""
"""
Boolean 'ordered' parameter for Categorical.
"""
return request.param


Expand Down Expand Up @@ -234,15 +238,16 @@ def cython_table_items(request):


def _get_cython_table_params(ndframe, func_names_and_expected):
"""combine frame, functions from SelectionMixin._cython_table
"""
Combine frame, functions from SelectionMixin._cython_table
Copy link
Member

Choose a reason for hiding this comment

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

Short description should be one line

keys and expected result.

Parameters
----------
ndframe : DataFrame or Series
func_names_and_expected : Sequence of two items
The first item is a name of a NDFrame method ('sum', 'prod') etc.
The second item is the expected return value
The second item is the expected return value.

Returns
-------
Expand Down Expand Up @@ -341,7 +346,8 @@ def strict_data_files(pytestconfig):

@pytest.fixture
def datapath(strict_data_files):
"""Get the path to a data file.
"""
Get the path to a data file.

Parameters
----------
Expand Down Expand Up @@ -375,7 +381,9 @@ def deco(*args):

@pytest.fixture
def iris(datapath):
"""The iris dataset as a DataFrame."""
"""
The iris dataset as a DataFrame.
"""
return pd.read_csv(datapath("data", "iris.csv"))


Expand Down Expand Up @@ -504,7 +512,8 @@ def tz_aware_fixture(request):

@pytest.fixture(params=STRING_DTYPES)
def string_dtype(request):
"""Parametrized fixture for string dtypes.
"""
Parametrized fixture for string dtypes.

* str
* 'str'
Expand All @@ -515,7 +524,8 @@ def string_dtype(request):

@pytest.fixture(params=BYTES_DTYPES)
def bytes_dtype(request):
"""Parametrized fixture for bytes dtypes.
"""
Parametrized fixture for bytes dtypes.

* bytes
* 'bytes'
Expand All @@ -525,7 +535,8 @@ def bytes_dtype(request):

@pytest.fixture(params=OBJECT_DTYPES)
def object_dtype(request):
"""Parametrized fixture for object dtypes.
"""
Parametrized fixture for object dtypes.

* object
* 'object'
Expand All @@ -535,7 +546,8 @@ def object_dtype(request):

@pytest.fixture(params=DATETIME64_DTYPES)
def datetime64_dtype(request):
"""Parametrized fixture for datetime64 dtypes.
"""
Parametrized fixture for datetime64 dtypes.

* 'datetime64[ns]'
* 'M8[ns]'
Expand All @@ -545,7 +557,8 @@ def datetime64_dtype(request):

@pytest.fixture(params=TIMEDELTA64_DTYPES)
def timedelta64_dtype(request):
"""Parametrized fixture for timedelta64 dtypes.
"""
Parametrized fixture for timedelta64 dtypes.

* 'timedelta64[ns]'
* 'm8[ns]'
Expand Down
24 changes: 16 additions & 8 deletions pandas/io/html.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
""":mod:`pandas.io.html` is a module containing functionality for dealing with
"""
:mod:`pandas.io.html` is a module containing functionality for dealing with
HTML IO.

"""
Expand Down Expand Up @@ -58,7 +59,8 @@ def _importers():


def _remove_whitespace(s, regex=_RE_WHITESPACE):
"""Replace extra whitespace inside of a string with a single space.
"""
Replace extra whitespace inside of a string with a single space.

Parameters
----------
Expand All @@ -77,7 +79,8 @@ def _remove_whitespace(s, regex=_RE_WHITESPACE):


def _get_skiprows(skiprows):
"""Get an iterator given an integer, slice or container.
"""
Get an iterator given an integer, slice or container.

Parameters
----------
Expand Down Expand Up @@ -107,7 +110,8 @@ def _get_skiprows(skiprows):


def _read(obj):
"""Try to read from a url, file or string.
"""
Try to read from a url, file or string.

Parameters
----------
Expand Down Expand Up @@ -136,7 +140,8 @@ def _read(obj):


class _HtmlFrameParser:
"""Base class for parsers that parse HTML into DataFrames.
"""
Base class for parsers that parse HTML into DataFrames.

Parameters
----------
Expand Down Expand Up @@ -515,7 +520,8 @@ def _handle_hidden_tables(self, tbl_list, attr_name):


class _BeautifulSoupHtml5LibFrameParser(_HtmlFrameParser):
"""HTML to DataFrame parser that uses BeautifulSoup under the hood.
"""
HTML to DataFrame parser that uses BeautifulSoup under the hood.

See Also
--------
Expand Down Expand Up @@ -622,7 +628,8 @@ def _build_xpath_expr(attrs):


class _LxmlFrameParser(_HtmlFrameParser):
"""HTML to DataFrame parser that uses lxml under the hood.
"""
HTML to DataFrame parser that uses lxml under the hood.

Warning
-------
Expand Down Expand Up @@ -937,7 +944,8 @@ def read_html(
keep_default_na=True,
displayed_only=True,
):
r"""Read HTML tables into a ``list`` of ``DataFrame`` objects.
r"""
Read HTML tables into a ``list`` of ``DataFrame`` objects.

Parameters
----------
Expand Down