Skip to content

Commit 39f44de

Browse files
authored
Merge pull request #24 from LinearBoost/finding-autofix-b7e9b811
Fix for Unused local variable
2 parents 82c07e6 + a97ddd2 commit 39f44de

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

src/linearboost/linear_boost.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -863,6 +863,7 @@ def fit(self, X, y, sample_weight=None) -> Self:
863863
# Store validation data (original features for kernel computation)
864864
validation_data = (X_val_transformed, y_val, sample_weight_val)
865865
y = y_train
866+
assert y is not None
866867
else:
867868
# For linear or approximate kernels, split after transformation
868869
n_samples = training_data.shape[0]
@@ -891,6 +892,7 @@ def fit(self, X, y, sample_weight=None) -> Self:
891892
# Store validation data for checking
892893
validation_data = (training_data_val, y_val, sample_weight_val)
893894
y = y_train
895+
assert y is not None
894896
else:
895897
y_train = y
896898

0 commit comments

Comments
 (0)