Skip to content

Commit fbd3a04

Browse files
MNT Update mypy (scikit-learn#31018)
1 parent 3e3e14e commit fbd3a04

File tree

5 files changed

+6
-6
lines changed

5 files changed

+6
-6
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ repos:
1616
hooks:
1717
- id: black
1818
- repo: https://github.com/pre-commit/mirrors-mypy
19-
rev: v1.9.0
19+
rev: v1.15.0
2020
hooks:
2121
- id: mypy
2222
files: sklearn/

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ tests = [
8585
"pytest-cov>=2.9.0",
8686
"ruff>=0.5.1",
8787
"black>=24.3.0",
88-
"mypy>=1.9",
88+
"mypy>=1.15",
8989
"pyamg>=5.0.0",
9090
"polars>=0.20.30",
9191
"pyarrow>=12.0.0",

sklearn/_loss/tests/test_loss.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ def test_loss_boundary(loss):
204204

205205

206206
@pytest.mark.parametrize(
207-
"loss, y_true_success, y_true_fail", Y_COMMON_PARAMS + Y_TRUE_PARAMS
207+
"loss, y_true_success, y_true_fail", Y_COMMON_PARAMS + Y_TRUE_PARAMS # type: ignore[operator]
208208
)
209209
def test_loss_boundary_y_true(loss, y_true_success, y_true_fail):
210210
"""Test boundaries of y_true for loss functions."""
@@ -215,7 +215,7 @@ def test_loss_boundary_y_true(loss, y_true_success, y_true_fail):
215215

216216

217217
@pytest.mark.parametrize(
218-
"loss, y_pred_success, y_pred_fail", Y_COMMON_PARAMS + Y_PRED_PARAMS # type: ignore
218+
"loss, y_pred_success, y_pred_fail", Y_COMMON_PARAMS + Y_PRED_PARAMS # type: ignore[operator]
219219
)
220220
def test_loss_boundary_y_pred(loss, y_pred_success, y_pred_fail):
221221
"""Test boundaries of y_pred for loss functions."""

sklearn/_min_dependencies.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
"pytest-cov": ("2.9.0", "tests"),
3535
"ruff": ("0.5.1", "tests"),
3636
"black": ("24.3.0", "tests"),
37-
"mypy": ("1.9", "tests"),
37+
"mypy": ("1.15", "tests"),
3838
"pyamg": ("5.0.0", "tests"),
3939
"polars": ("0.20.30", "docs, tests"),
4040
"pyarrow": ("12.0.0", "tests"),

sklearn/tree/_classes.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1993,5 +1993,5 @@ def __sklearn_tags__(self):
19931993
"friedman_mse",
19941994
"poisson",
19951995
}
1996-
tags.input_tags.allow_nan: allow_nan
1996+
tags.input_tags.allow_nan = allow_nan
19971997
return tags

0 commit comments

Comments
 (0)