Skip to content

Commit

Permalink
fix(python): Keep Series attributes docstrings when read by Sphinx (p…
Browse files Browse the repository at this point in the history
…ola-rs#13731)

Co-authored-by: Stijn de Gooijer <stijndegooijer@gmail.com>
  • Loading branch information
2 people authored and r-brink committed Jan 24, 2024
1 parent 4f70c7e commit de36548
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 7 deletions.
1 change: 0 additions & 1 deletion py-polars/docs/source/reference/dataframe/attributes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ Attributes
DataFrame.dtypes
DataFrame.flags
DataFrame.height
DataFrame.plot
DataFrame.schema
DataFrame.shape
DataFrame.width
6 changes: 1 addition & 5 deletions py-polars/docs/source/reference/series/attributes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,10 @@ Attributes
.. currentmodule:: polars
.. autosummary::
:toctree: api/
:template: autosummary/accessor_attribute.rst

Series.cat
Series.dt
Series.dtype
Series.inner_dtype
Series.list
Series.name
Series.shape
Series.str
Series.flags
Series.plot
2 changes: 1 addition & 1 deletion py-polars/polars/utils/various.py
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,7 @@ def __get__( # type: ignore[override]
instance if isinstance(instance, cls) else cls
)
except (AttributeError, ImportError):
return None # type: ignore[return-value]
return self # type: ignore[return-value]


class _NoDefault(Enum):
Expand Down

0 comments on commit de36548

Please sign in to comment.