diff --git a/python-package/lightgbm/basic.py b/python-package/lightgbm/basic.py index 8256dc026973..e17e8513f7ca 100644 --- a/python-package/lightgbm/basic.py +++ b/python-package/lightgbm/basic.py @@ -1593,7 +1593,7 @@ def __init__( self.used_indices: Optional[List[int]] = None self._need_slice = True self._predictor: Optional[_InnerPredictor] = None - self.pandas_categorical = None + self.pandas_categorical: Optional[List[List]] = None self._params_back_up = None self.version = 0 self._start_row = 0 # Used when pushing rows one by one. diff --git a/python-package/lightgbm/callback.py b/python-package/lightgbm/callback.py index 7db3d400ecd6..2f77ee740c75 100644 --- a/python-package/lightgbm/callback.py +++ b/python-package/lightgbm/callback.py @@ -164,7 +164,7 @@ def __call__(self, env: CallbackEnv) -> None: else: data_name, eval_name = item[1].split() res_mean = item[2] - res_stdv = item[4] + res_stdv = item[4] # type: ignore[misc] self.eval_result[data_name][f'{eval_name}-mean'].append(res_mean) self.eval_result[data_name][f'{eval_name}-stdv'].append(res_stdv)