Skip to content

Commit a97ddd2

Browse files
Fix for Unused local variable
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
1 parent 82c07e6 commit a97ddd2

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)