Skip to content

Commit

Permalink
fix docstring?
Browse files Browse the repository at this point in the history
  • Loading branch information
Rohan Jain committed Nov 1, 2023
1 parent 175a91b commit 79962be
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions pandas/core/arrays/arrow/accessors.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,11 @@ class ListAccessor(_ArrowAccessor):
Series containing Arrow list data.
"""

_validation_msg = (
"Can only use the '.list' accessor with 'list[pyarrow]' dtype, not {dtype}."
)
@property
def _validation_msg(self) -> str:
return (
"Can only use the '.list' accessor with 'list[pyarrow]' dtype, not {dtype}."
)

def __init__(self, data=None) -> None:
super().__init__(data)
Expand Down Expand Up @@ -221,9 +223,11 @@ class StructAccessor(_ArrowAccessor):
Series containing Arrow struct data.
"""

_validation_msg = (
"Can only use the '.struct' accessor with 'struct[pyarrow]' dtype, not {dtype}."
)
@property
def _validation_msg(self) -> str:
return (
"Can only use the '.list' accessor with 'list[pyarrow]' dtype, not {dtype}."
)

def __init__(self, data=None) -> None:
super().__init__(data)
Expand Down

0 comments on commit 79962be

Please sign in to comment.