Skip to content

Commit b7b5f54

Browse files
Eliminate pylint nits
1 parent fd6428e commit b7b5f54

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

khiops/sklearn/estimators.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -677,8 +677,8 @@ def _create_computation_dir(self, method_name):
677677
def _assert_is_fitted(self):
678678
try:
679679
check_is_fitted(self)
680-
except NotFittedError:
681-
raise AssertionError("Model not fitted")
680+
except NotFittedError as exc:
681+
raise AssertionError("Model not fitted") from exc
682682

683683

684684
# Note: scikit-learn **requires** inherit first the mixins and then other classes

tests/test_remote_access.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,8 +129,10 @@ def is_in_a_conda_env():
129129
if not isinstance(kh.get_runner(), KhiopsLocalRunner):
130130
return False
131131

132-
# Get path to the Khiops executable
132+
# Get path to the Khiops executable (temporarily disable pylint warning)
133+
# pylint: disable=protected-access
133134
khiops_path = kh.get_runner()._khiops_path
135+
# pylint: enable=protected-access
134136

135137
# If $(dirname khiops_path) is identical to $CONDA_PREFIX/bin,
136138
# then return True

tests/test_sklearn.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
import numpy as np
1717
from sklearn.exceptions import NotFittedError
1818
from sklearn.utils.estimator_checks import check_estimator
19-
from sklearn.utils.validation import NotFittedError, check_is_fitted
19+
from sklearn.utils.validation import check_is_fitted
2020

2121
import khiops.core as kh
2222
from khiops.sklearn.estimators import (

0 commit comments

Comments
 (0)