Skip to content

Commit 15311db

Browse files
committed
Fix E501 lint errors
1 parent 87cc9dc commit 15311db

File tree

1 file changed

+16
-8
lines changed

1 file changed

+16
-8
lines changed

pandas/core/accessor.py

+16-8
Original file line numberDiff line numberDiff line change
@@ -263,10 +263,12 @@ def _register_accessor(name: str, cls):
263263
264264
* Must contain an init method that:
265265
* accepts a single {klass} object
266-
* raises an {AttributeError} if the {klass} object does not have correctly matching inputs for the accessor
266+
* raises an {AttributeError} if the {klass} object does not have correctly
267+
matching inputs for the accessor
267268
* Must contain a method for each access pattern.
268269
* The methods should be able to take any argument signature.
269-
* Accessible using the @property decorator if no additional arguments are needed.
270+
* Accessible using the @property decorator if no additional arguments are
271+
needed.
270272
"""
271273

272274
def decorator(accessor):
@@ -288,7 +290,9 @@ def decorator(accessor):
288290
_register_df_doc = """
289291
Examples
290292
--------
291-
In your library code, an accessor that only accepts integers could have a class defined like this:
293+
In your library code, an accessor that only accepts integers could
294+
have a class defined like this:
295+
292296
.. code-block:: python
293297
294298
import pandas as pd
@@ -310,7 +314,7 @@ def sum(self):
310314
>>> df.int_accessor
311315
Traceback (most recent call last):
312316
...
313-
AttributeError: All columns must contain integer values only. Did you mean: '_accessors'?
317+
AttributeError: All columns must contain integer values only.
314318
>>> df = pd.DataFrame([[1, 2], [3, 4]])
315319
>>> df.int_accessor.sum()
316320
0 4
@@ -330,7 +334,9 @@ def register_dataframe_accessor(name: str):
330334
_series_doc = """
331335
Examples
332336
--------
333-
In your library code, an accessor that only accepts integers could have a class defined like this:
337+
In your library code, an accessor that only accepts integers could
338+
have a class defined like this:
339+
334340
.. code-block:: python
335341
336342
import pandas as pd
@@ -352,7 +358,7 @@ def sum(self):
352358
>>> df.int_accessor
353359
Traceback (most recent call last):
354360
...
355-
AttributeError: The series must contain integer data only. Did you mean: '_accessors'?
361+
AttributeError: The series must contain integer data only.
356362
>>> df = pd.Series([1, 2, 3])
357363
>>> df.int_accessor.sum
358364
6
@@ -370,7 +376,9 @@ def register_series_accessor(name: str):
370376
_index_doc = """
371377
Examples
372378
--------
373-
In your library code, an accessor that only accepts integers could have a class defined like this:
379+
In your library code, an accessor that only accepts integers could
380+
have a class defined like this:
381+
374382
.. code-block:: python
375383
376384
import pandas as pd
@@ -394,7 +402,7 @@ def even(self):
394402
>>> df.index.int_accessor
395403
Traceback (most recent call last):
396404
...
397-
AttributeError: The index must only be an integer value. Did you mean: '_accessors'?
405+
AttributeError: The index must only be an integer value.
398406
>>> df = pd.DataFrame({
399407
'col1': [1, 2, 3, 4],
400408
'col2': ['a', 'b', 'c', 'd']

0 commit comments

Comments
 (0)