Skip to content

Commit

Permalink
change black version
Browse files Browse the repository at this point in the history
  • Loading branch information
LukasDrews97 committed Apr 12, 2024
1 parent 121e134 commit e4600d8
Show file tree
Hide file tree
Showing 8 changed files with 196 additions and 190 deletions.
2 changes: 1 addition & 1 deletion Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ pytest-cov = "3.0.0"
twine = "*"
sphinx = "4.1.1"
sphinx-rtd-theme = "0.5.2"
black = "22.10.0"
black = {version = "24.3.0", extras = ["colorama"]}
pre-commit = "2.20.0"
pyfakefs = "*"
shap = "0.44.1"
Expand Down
357 changes: 178 additions & 179 deletions Pipfile.lock

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions hiclass/Pipeline.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Custom Pipeline class that supports the `calibrate` method."""

from sklearn.pipeline import Pipeline as skPipeline


Expand Down
1 change: 1 addition & 0 deletions hiclass/probability_combiner/ArithmeticMeanCombiner.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Defines the ArithmeticMeanCombiner."""

import numpy as np
from hiclass.probability_combiner.ProbabilityCombiner import ProbabilityCombiner
from typing import List
Expand Down
1 change: 1 addition & 0 deletions hiclass/probability_combiner/GeometricMeanCombiner.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Defines the GeometricMeanCombiner."""

import numpy as np
from hiclass.probability_combiner.ProbabilityCombiner import ProbabilityCombiner
from typing import List
Expand Down
1 change: 1 addition & 0 deletions hiclass/probability_combiner/MultiplyCombiner.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Defines the MultiplyCombiner."""

import numpy as np
from hiclass.probability_combiner.ProbabilityCombiner import ProbabilityCombiner
from typing import List
Expand Down
1 change: 1 addition & 0 deletions hiclass/probability_combiner/ProbabilityCombiner.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Abstract class defining the structure of a probability combiner."""

import abc
import numpy as np
from typing import List
Expand Down
22 changes: 12 additions & 10 deletions tests/test_calibration.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,11 +82,12 @@ def binary_cal_X():
@pytest.fixture
def binary_mock_estimator(binary_calibration_data, binary_test_scores):
# return calibration scores or test scores depending on input size
side_effect = (
lambda X: binary_calibration_data[0]
if len(X) == len(binary_calibration_data[0])
else binary_test_scores
)
def side_effect(X):
return (
binary_calibration_data[0]
if len(X) == len(binary_calibration_data[0])
else binary_test_scores
)

lr = LogisticRegression()
binary_estimator = Mock(spec=lr)
Expand Down Expand Up @@ -140,11 +141,12 @@ def multiclass_test_scores():
@pytest.fixture
def multiclass_mock_estimator(multiclass_calibration_data, multiclass_test_scores):
# return calibration scores or test scores depending on input size
side_effect = (
lambda X: multiclass_calibration_data[0]
if len(X) == len(multiclass_calibration_data[0])
else multiclass_test_scores
)
def side_effect(X):
return (
multiclass_calibration_data[0]
if len(X) == len(multiclass_calibration_data[0])
else multiclass_test_scores
)

multiclass_estimator = Mock(spec=LogisticRegression)
multiclass_estimator.predict_proba.side_effect = side_effect
Expand Down

0 comments on commit e4600d8

Please sign in to comment.