Skip to content

Commit e4f7d30

Browse files
authored
deps: Bump ruff version (#2741)
1 parent 7cfa873 commit e4f7d30

File tree

4 files changed

+11
-3
lines changed

4 files changed

+11
-3
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ ci:
33
repos:
44
- repo: https://github.com/astral-sh/ruff-pre-commit
55
# Ruff version.
6-
rev: 'v0.11.12'
6+
rev: 'v0.12.1'
77
hooks:
88
# Run the formatter.
99
- id: ruff-format

pyproject.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,8 +167,10 @@ ignore = [
167167
"PD003", # pandas-use-of-dot-is-null
168168
"PD010", # pandas-use-of-dot-pivot-or-unstack
169169
"PD901", # pandas-df-variable-name (This is a auxiliary library so dataframe variables have no concrete business meaning)
170+
"PLC0415", # `import` should be at the top-level of a file
170171
"PLR0913", # too-many-arguments
171172
"PLR2004", # magic-value-comparison
173+
"PLW1641", # Object does not implement `__hash__` method
172174
"RET505", # superfluous-else-return
173175
"SLF001", # private-member-access
174176
"TD003", # missing-todo-link

tests/expr_and_series/unique_test.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,9 @@ def test_unique_series(constructor_eager: ConstructorEager) -> None:
5454
series = nw.from_native(constructor_eager(data), eager_only=True)["a"]
5555
# this shouldn't warn
5656
series.to_frame().select(nw_v1.col("a").unique().sum())
57-
with pytest.warns(UserWarning):
57+
with pytest.warns(
58+
UserWarning,
59+
match="`maintain_order` has no effect and is only kept around for backwards-compatibility.",
60+
):
5861
# this warns that maintain_order has no effect
5962
series.to_frame().select(nw_v1.col("a").unique(maintain_order=False).sum())

tests/utils_test.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -477,7 +477,10 @@ def func3(
477477
non_default = cast("ModuleType", "non_default")
478478

479479
assert func1(param, native_namespace=non_default) is None
480-
with pytest.warns(DeprecationWarning):
480+
with pytest.warns(
481+
DeprecationWarning,
482+
match="`native_namespace` is deprecated, please use `backend` instead",
483+
):
481484
result = func2(param, native_namespace=pl)
482485
assert result is pl
483486
assert func2(param, backend=pl) is pl

0 commit comments

Comments
 (0)