Skip to content

Commit

Permalink
docs(render): fix rendering of backend method docstrings (#10313)
Browse files Browse the repository at this point in the history
  • Loading branch information
cpcloud authored Oct 14, 2024
1 parent 198c562 commit a4fe3ee
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
2 changes: 1 addition & 1 deletion docs/backends/_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def render_method(*, member, renderer: MdRenderer) -> Iterator[str]:
yield f"`{name}({params})`"
yield "\n"

yield renderer.render(find_member_with_docstring(member))
yield get_renderer(header_level + 1).render(find_member_with_docstring(member))


def render_methods(obj, *methods: str, level: int) -> None:
Expand Down
13 changes: 6 additions & 7 deletions ibis/expr/types/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -584,6 +584,8 @@ def to_parquet(
This method is eager and will execute the associated expression
immediately.
See https://arrow.apache.org/docs/python/generated/pyarrow.parquet.ParquetWriter.html for details.
Parameters
----------
path
Expand All @@ -593,8 +595,6 @@ def to_parquet(
**kwargs
Additional keyword arguments passed to pyarrow.parquet.ParquetWriter
https://arrow.apache.org/docs/python/generated/pyarrow.parquet.ParquetWriter.html
Examples
--------
Write out an expression to a single parquet file.
Expand Down Expand Up @@ -631,6 +631,8 @@ def to_parquet_dir(
This method is eager and will execute the associated expression
immediately.
See https://arrow.apache.org/docs/python/generated/pyarrow.dataset.write_dataset.html for details.
Parameters
----------
directory
Expand All @@ -639,9 +641,6 @@ def to_parquet_dir(
Mapping of scalar parameter expressions to value.
**kwargs
Additional keyword arguments passed to pyarrow.dataset.write_dataset
https://arrow.apache.org/docs/python/generated/pyarrow.dataset.write_dataset.html
"""
self._find_backend(use_default=True).to_parquet_dir(self, directory, **kwargs)

Expand All @@ -658,6 +657,8 @@ def to_csv(
This method is eager and will execute the associated expression
immediately.
See https://arrow.apache.org/docs/python/generated/pyarrow.csv.CSVWriter.html for details.
Parameters
----------
path
Expand All @@ -666,8 +667,6 @@ def to_csv(
Mapping of scalar parameter expressions to value.
**kwargs
Additional keyword arguments passed to pyarrow.csv.CSVWriter
https://arrow.apache.org/docs/python/generated/pyarrow.csv.CSVWriter.html
"""
self._find_backend(use_default=True).to_csv(self, path, **kwargs)

Expand Down

0 comments on commit a4fe3ee

Please sign in to comment.