Skip to content

Commit

Permalink
Update warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
stinodego committed Oct 24, 2023
1 parent f224b84 commit 1d27b11
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 11 deletions.
4 changes: 1 addition & 3 deletions py-polars/polars/expr/string.py
Original file line number Diff line number Diff line change
Expand Up @@ -2103,6 +2103,4 @@ def _validate_format_argument(format: str | None) -> None:
" Use `%.f` instead."
" See the full specification: https://docs.rs/chrono/latest/chrono/format/strftime"
)
warnings.warn(
message, category=ChronoFormatWarning, stacklevel=find_stacklevel()
)
warnings.warn(message, ChronoFormatWarning, stacklevel=find_stacklevel())
12 changes: 4 additions & 8 deletions py-polars/polars/lazyframe/frame.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import contextlib
import os
import warnings
from collections import OrderedDict
from datetime import date, datetime, time, timedelta
from functools import reduce
Expand Down Expand Up @@ -72,7 +71,6 @@
_in_notebook,
_prepare_row_count_args,
_process_null_values,
find_stacklevel,
is_bool_sequence,
is_sequence,
normalize_filepath,
Expand Down Expand Up @@ -3443,12 +3441,10 @@ def group_by_dynamic(
label = "left"
else:
label = "datapoint"
warnings.warn(
f"`truncate` is deprecated and will be removed in a future version. "
f"Please replace `truncate={truncate}` with `label='{label}'` to "
"silence this warning.",
DeprecationWarning,
stacklevel=find_stacklevel(),
issue_deprecation_warning(
f"`truncate` is deprecated and will be removed in a future version."
f" Please replace `truncate={truncate}` with `label='{label}'` to silence this warning.",
version="0.19.4",
)

index_column = parse_as_expression(index_column)
Expand Down

0 comments on commit 1d27b11

Please sign in to comment.