Skip to content

Commit 4655d8b

Browse files
authored
MNT update to mypy=1.3 (scikit-learn#26632)
1 parent 41b8375 commit 4655d8b

File tree

5 files changed

+6
-4
lines changed

5 files changed

+6
-4
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ repos:
1515
hooks:
1616
- id: ruff
1717
- repo: https://github.com/pre-commit/mirrors-mypy
18-
rev: v0.961
18+
rev: v1.3.0
1919
hooks:
2020
- id: mypy
2121
files: sklearn/

setup.cfg

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ filterwarnings =
2828
[mypy]
2929
ignore_missing_imports = True
3030
allow_redefinition = True
31+
exclude=
32+
sklearn/externals
3133

3234
[check-manifest]
3335
# ignore files missing in VCS

sklearn/_min_dependencies.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
"pytest-cov": ("2.9.0", "tests"),
4040
"ruff": ("0.0.272", "tests"),
4141
"black": ("23.3.0", "tests"),
42-
"mypy": ("0.961", "tests"),
42+
"mypy": ("1.3", "tests"),
4343
"pyamg": ("4.0.0", "tests"),
4444
"sphinx": ("4.0.1", "docs"),
4545
"sphinx-gallery": ("0.7.0", "docs"),

sklearn/cluster/_hdbscan/hdbscan.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@
6262
# Encodings are arbitrary but must be strictly negative.
6363
# The current encodings are chosen as extensions to the -1 noise label.
6464
# Avoided enums so that the end user only deals with simple labels.
65-
_OUTLIER_ENCODING = {
65+
_OUTLIER_ENCODING: dict = {
6666
"infinite": {
6767
"label": -2,
6868
# The probability could also be 1, since infinite points are certainly

sklearn/tests/test_metaestimators_metadata_routing.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ def predict_log_proba(self, X, sample_weight="default", metadata="default"):
171171
# return np.zeros(shape=(len(X), 2))
172172

173173

174-
METAESTIMATORS = [
174+
METAESTIMATORS: list = [
175175
{
176176
"metaestimator": MultiOutputRegressor,
177177
"estimator_name": "estimator",

0 commit comments

Comments
 (0)