Skip to content

Commit e4600d8

Browse files
committed
change black version
1 parent 121e134 commit e4600d8

File tree

8 files changed

+196
-190
lines changed

8 files changed

+196
-190
lines changed

Pipfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ pytest-cov = "3.0.0"
1919
twine = "*"
2020
sphinx = "4.1.1"
2121
sphinx-rtd-theme = "0.5.2"
22-
black = "22.10.0"
22+
black = {version = "24.3.0", extras = ["colorama"]}
2323
pre-commit = "2.20.0"
2424
pyfakefs = "*"
2525
shap = "0.44.1"

Pipfile.lock

Lines changed: 178 additions & 179 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

hiclass/Pipeline.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Custom Pipeline class that supports the `calibrate` method."""
2+
23
from sklearn.pipeline import Pipeline as skPipeline
34

45

hiclass/probability_combiner/ArithmeticMeanCombiner.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Defines the ArithmeticMeanCombiner."""
2+
23
import numpy as np
34
from hiclass.probability_combiner.ProbabilityCombiner import ProbabilityCombiner
45
from typing import List

hiclass/probability_combiner/GeometricMeanCombiner.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Defines the GeometricMeanCombiner."""
2+
23
import numpy as np
34
from hiclass.probability_combiner.ProbabilityCombiner import ProbabilityCombiner
45
from typing import List

hiclass/probability_combiner/MultiplyCombiner.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Defines the MultiplyCombiner."""
2+
23
import numpy as np
34
from hiclass.probability_combiner.ProbabilityCombiner import ProbabilityCombiner
45
from typing import List

hiclass/probability_combiner/ProbabilityCombiner.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Abstract class defining the structure of a probability combiner."""
2+
23
import abc
34
import numpy as np
45
from typing import List

tests/test_calibration.py

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -82,11 +82,12 @@ def binary_cal_X():
8282
@pytest.fixture
8383
def binary_mock_estimator(binary_calibration_data, binary_test_scores):
8484
# return calibration scores or test scores depending on input size
85-
side_effect = (
86-
lambda X: binary_calibration_data[0]
87-
if len(X) == len(binary_calibration_data[0])
88-
else binary_test_scores
89-
)
85+
def side_effect(X):
86+
return (
87+
binary_calibration_data[0]
88+
if len(X) == len(binary_calibration_data[0])
89+
else binary_test_scores
90+
)
9091

9192
lr = LogisticRegression()
9293
binary_estimator = Mock(spec=lr)
@@ -140,11 +141,12 @@ def multiclass_test_scores():
140141
@pytest.fixture
141142
def multiclass_mock_estimator(multiclass_calibration_data, multiclass_test_scores):
142143
# return calibration scores or test scores depending on input size
143-
side_effect = (
144-
lambda X: multiclass_calibration_data[0]
145-
if len(X) == len(multiclass_calibration_data[0])
146-
else multiclass_test_scores
147-
)
144+
def side_effect(X):
145+
return (
146+
multiclass_calibration_data[0]
147+
if len(X) == len(multiclass_calibration_data[0])
148+
else multiclass_test_scores
149+
)
148150

149151
multiclass_estimator = Mock(spec=LogisticRegression)
150152
multiclass_estimator.predict_proba.side_effect = side_effect

0 commit comments

Comments
 (0)