Skip to content

Commit

Permalink
docs(python): Various deprecation docstring improvements (#15648)
Browse files Browse the repository at this point in the history
Co-authored-by: Henry Harbeck <[email protected]>
Co-authored-by: Alexander Beedie <[email protected]>
  • Loading branch information
3 people authored Apr 15, 2024
1 parent 5e68541 commit 70b71da
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion py-polars/polars/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,7 @@
"PolarsDataType",
# polars.io
"read_avro",
"read_clipboard",
"read_csv",
"read_csv_batched",
"read_database",
Expand All @@ -318,7 +319,6 @@
"scan_ndjson",
"scan_parquet",
"scan_pyarrow_dataset",
"read_clipboard",
# polars.stringcache
"StringCache",
"disable_string_cache",
Expand Down
2 changes: 1 addition & 1 deletion py-polars/polars/_utils/deprecation.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ def deprecate_parameter_as_positional(
old_name: str, *, version: str
) -> Callable[[Callable[P, T]], Callable[P, T]]:
"""
Decorator to mark a function argument as deprecated due to being made positinoal.
Decorator to mark a function argument as deprecated due to being made positional.
Use as follows::
Expand Down
2 changes: 1 addition & 1 deletion py-polars/polars/dataframe/frame.py
Original file line number Diff line number Diff line change
Expand Up @@ -4796,7 +4796,7 @@ def with_row_count(self, name: str = "row_nr", offset: int = 0) -> Self:
"""
Add a column at index 0 that counts the rows.
.. deprecated::
.. deprecated:: 0.20.4
Use :meth:`with_row_index` instead.
Note that the default column name has changed from 'row_nr' to 'index'.
Expand Down
2 changes: 1 addition & 1 deletion py-polars/polars/expr/datetime.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ def truncate(
- `False`: use the latest datetime
.. deprecated:: 0.19.0
Use `ambiguous` instead
This is now automatically inferred; you can safely omit this argument.
ambiguous
Determine how to deal with ambiguous datetimes:
Expand Down
2 changes: 1 addition & 1 deletion py-polars/polars/expr/string.py
Original file line number Diff line number Diff line change
Expand Up @@ -2586,7 +2586,7 @@ def rjust(self, length: int, fill_char: str = " ") -> Expr:
"""
return self.pad_start(length, fill_char)

@deprecate_renamed_function("json_decode", version="0.19.12")
@deprecate_renamed_function("json_decode", version="0.19.15")
def json_extract(
self,
dtype: PolarsDataType | None = None,
Expand Down
2 changes: 1 addition & 1 deletion py-polars/polars/io/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@

__all__ = [
"read_avro",
"read_clipboard",
"read_csv",
"read_csv_batched",
"read_database",
Expand All @@ -36,5 +37,4 @@
"scan_ndjson",
"scan_parquet",
"scan_pyarrow_dataset",
"read_clipboard",
]
2 changes: 1 addition & 1 deletion py-polars/polars/lazyframe/frame.py
Original file line number Diff line number Diff line change
Expand Up @@ -4712,7 +4712,7 @@ def with_row_count(self, name: str = "row_nr", offset: int = 0) -> Self:
"""
Add a column at index 0 that counts the rows.
.. deprecated::
.. deprecated:: 0.20.4
Use :meth:`with_row_index` instead.
Note that the default column name has changed from 'row_nr' to 'index'.
Expand Down
2 changes: 1 addition & 1 deletion py-polars/polars/series/datetime.py
Original file line number Diff line number Diff line change
Expand Up @@ -1694,7 +1694,7 @@ def truncate(
- `False`: use the latest datetime
.. deprecated:: 0.19.0
Use `ambiguous` instead
This is now automatically inferred; you can safely omit this argument.
ambiguous
Determine how to deal with ambiguous datetimes:
Expand Down

0 comments on commit 70b71da

Please sign in to comment.