From a97ddd21db36c6f7c76aa2f0c540e55a9b2a8f2e Mon Sep 17 00:00:00 2001 From: Hamidreza Keshavarz <32555614+hamidkm9@users.noreply.github.com> Date: Fri, 27 Feb 2026 23:04:23 +0100 Subject: [PATCH] Fix for Unused local variable Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> --- src/linearboost/linear_boost.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/linearboost/linear_boost.py b/src/linearboost/linear_boost.py index 4088de8..a88c6ba 100644 --- a/src/linearboost/linear_boost.py +++ b/src/linearboost/linear_boost.py @@ -863,6 +863,7 @@ def fit(self, X, y, sample_weight=None) -> Self: # Store validation data (original features for kernel computation) validation_data = (X_val_transformed, y_val, sample_weight_val) y = y_train + assert y is not None else: # For linear or approximate kernels, split after transformation n_samples = training_data.shape[0] @@ -891,6 +892,7 @@ def fit(self, X, y, sample_weight=None) -> Self: # Store validation data for checking validation_data = (training_data_val, y_val, sample_weight_val) y = y_train + assert y is not None else: y_train = y