Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

depr(python): Make parameter of str.to_decimal keyword-only #20570

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions py-polars/polars/expr/string.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
from polars import functions as F
from polars._utils.deprecation import (
deprecate_function,
deprecate_nonkeyword_arguments,
issue_deprecation_warning,
)
from polars._utils.parse import parse_into_expression
Expand Down Expand Up @@ -313,6 +314,7 @@ def strptime(
msg = "`dtype` must be of type {Date, Datetime, Time}"
raise ValueError(msg)

@deprecate_nonkeyword_arguments(allowed_args=["self"], version="1.20.0")
def to_decimal(
self,
inference_length: int = 100,
Expand Down
3 changes: 2 additions & 1 deletion py-polars/polars/series/string.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from typing import TYPE_CHECKING

from polars._utils.deprecation import deprecate_function
from polars._utils.deprecation import deprecate_function, deprecate_nonkeyword_arguments
from polars._utils.unstable import unstable
from polars._utils.various import no_default
from polars.datatypes.constants import N_INFER_DEFAULT
Expand Down Expand Up @@ -270,6 +270,7 @@ def strptime(
]
"""

@deprecate_nonkeyword_arguments(allowed_args=["self"], version="1.20.0")
def to_decimal(
self,
inference_length: int = 100,
Expand Down
Loading