Skip to content

Commit 5cd008b

Browse files
steveayers124proost
authored andcommitted
DOC: Fix GL01 and GL02 errors in the docstrings (pandas-dev#27988)
1 parent e82093c commit 5cd008b

File tree

2 files changed

+41
-20
lines changed

2 files changed

+41
-20
lines changed

pandas/conftest.py

+25-12
Original file line numberDiff line numberDiff line change
@@ -123,18 +123,22 @@ def ip():
123123

124124
@pytest.fixture(params=[True, False, None])
125125
def observed(request):
126-
""" pass in the observed keyword to groupby for [True, False]
126+
"""
127+
Pass in the observed keyword to groupby for [True, False]
127128
This indicates whether categoricals should return values for
128129
values which are not in the grouper [False / None], or only values which
129130
appear in the grouper [True]. [None] is supported for future compatibility
130131
if we decide to change the default (and would need to warn if this
131-
parameter is not passed)"""
132+
parameter is not passed).
133+
"""
132134
return request.param
133135

134136

135137
@pytest.fixture(params=[True, False, None])
136138
def ordered_fixture(request):
137-
"""Boolean 'ordered' parameter for Categorical."""
139+
"""
140+
Boolean 'ordered' parameter for Categorical.
141+
"""
138142
return request.param
139143

140144

@@ -234,15 +238,16 @@ def cython_table_items(request):
234238

235239

236240
def _get_cython_table_params(ndframe, func_names_and_expected):
237-
"""combine frame, functions from SelectionMixin._cython_table
241+
"""
242+
Combine frame, functions from SelectionMixin._cython_table
238243
keys and expected result.
239244
240245
Parameters
241246
----------
242247
ndframe : DataFrame or Series
243248
func_names_and_expected : Sequence of two items
244249
The first item is a name of a NDFrame method ('sum', 'prod') etc.
245-
The second item is the expected return value
250+
The second item is the expected return value.
246251
247252
Returns
248253
-------
@@ -341,7 +346,8 @@ def strict_data_files(pytestconfig):
341346

342347
@pytest.fixture
343348
def datapath(strict_data_files):
344-
"""Get the path to a data file.
349+
"""
350+
Get the path to a data file.
345351
346352
Parameters
347353
----------
@@ -375,7 +381,9 @@ def deco(*args):
375381

376382
@pytest.fixture
377383
def iris(datapath):
378-
"""The iris dataset as a DataFrame."""
384+
"""
385+
The iris dataset as a DataFrame.
386+
"""
379387
return pd.read_csv(datapath("data", "iris.csv"))
380388

381389

@@ -504,7 +512,8 @@ def tz_aware_fixture(request):
504512

505513
@pytest.fixture(params=STRING_DTYPES)
506514
def string_dtype(request):
507-
"""Parametrized fixture for string dtypes.
515+
"""
516+
Parametrized fixture for string dtypes.
508517
509518
* str
510519
* 'str'
@@ -515,7 +524,8 @@ def string_dtype(request):
515524

516525
@pytest.fixture(params=BYTES_DTYPES)
517526
def bytes_dtype(request):
518-
"""Parametrized fixture for bytes dtypes.
527+
"""
528+
Parametrized fixture for bytes dtypes.
519529
520530
* bytes
521531
* 'bytes'
@@ -525,7 +535,8 @@ def bytes_dtype(request):
525535

526536
@pytest.fixture(params=OBJECT_DTYPES)
527537
def object_dtype(request):
528-
"""Parametrized fixture for object dtypes.
538+
"""
539+
Parametrized fixture for object dtypes.
529540
530541
* object
531542
* 'object'
@@ -535,7 +546,8 @@ def object_dtype(request):
535546

536547
@pytest.fixture(params=DATETIME64_DTYPES)
537548
def datetime64_dtype(request):
538-
"""Parametrized fixture for datetime64 dtypes.
549+
"""
550+
Parametrized fixture for datetime64 dtypes.
539551
540552
* 'datetime64[ns]'
541553
* 'M8[ns]'
@@ -545,7 +557,8 @@ def datetime64_dtype(request):
545557

546558
@pytest.fixture(params=TIMEDELTA64_DTYPES)
547559
def timedelta64_dtype(request):
548-
"""Parametrized fixture for timedelta64 dtypes.
560+
"""
561+
Parametrized fixture for timedelta64 dtypes.
549562
550563
* 'timedelta64[ns]'
551564
* 'm8[ns]'

pandas/io/html.py

+16-8
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
""":mod:`pandas.io.html` is a module containing functionality for dealing with
1+
"""
2+
:mod:`pandas.io.html` is a module containing functionality for dealing with
23
HTML IO.
34
45
"""
@@ -58,7 +59,8 @@ def _importers():
5859

5960

6061
def _remove_whitespace(s, regex=_RE_WHITESPACE):
61-
"""Replace extra whitespace inside of a string with a single space.
62+
"""
63+
Replace extra whitespace inside of a string with a single space.
6264
6365
Parameters
6466
----------
@@ -77,7 +79,8 @@ def _remove_whitespace(s, regex=_RE_WHITESPACE):
7779

7880

7981
def _get_skiprows(skiprows):
80-
"""Get an iterator given an integer, slice or container.
82+
"""
83+
Get an iterator given an integer, slice or container.
8184
8285
Parameters
8386
----------
@@ -107,7 +110,8 @@ def _get_skiprows(skiprows):
107110

108111

109112
def _read(obj):
110-
"""Try to read from a url, file or string.
113+
"""
114+
Try to read from a url, file or string.
111115
112116
Parameters
113117
----------
@@ -136,7 +140,8 @@ def _read(obj):
136140

137141

138142
class _HtmlFrameParser:
139-
"""Base class for parsers that parse HTML into DataFrames.
143+
"""
144+
Base class for parsers that parse HTML into DataFrames.
140145
141146
Parameters
142147
----------
@@ -515,7 +520,8 @@ def _handle_hidden_tables(self, tbl_list, attr_name):
515520

516521

517522
class _BeautifulSoupHtml5LibFrameParser(_HtmlFrameParser):
518-
"""HTML to DataFrame parser that uses BeautifulSoup under the hood.
523+
"""
524+
HTML to DataFrame parser that uses BeautifulSoup under the hood.
519525
520526
See Also
521527
--------
@@ -622,7 +628,8 @@ def _build_xpath_expr(attrs):
622628

623629

624630
class _LxmlFrameParser(_HtmlFrameParser):
625-
"""HTML to DataFrame parser that uses lxml under the hood.
631+
"""
632+
HTML to DataFrame parser that uses lxml under the hood.
626633
627634
Warning
628635
-------
@@ -937,7 +944,8 @@ def read_html(
937944
keep_default_na=True,
938945
displayed_only=True,
939946
):
940-
r"""Read HTML tables into a ``list`` of ``DataFrame`` objects.
947+
r"""
948+
Read HTML tables into a ``list`` of ``DataFrame`` objects.
941949
942950
Parameters
943951
----------

0 commit comments

Comments
 (0)