Skip to content

Commit 6ab795b

Browse files
committed
ENH: Avoid type checking for private function import statement
Avoid type checking for private function import statement. Fixes: ``` src/nifreeze/model/gpr.py:215: error: Module "sklearn.utils.optimize" has no attribute "_check_optimize_result" [attr-defined] ``` raised for example in: https://github.com/nipreps/nifreeze/actions/runs/12437972140/job/34728973936#step:8:73
1 parent 6f5cad6 commit 6ab795b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/nifreeze/model/gpr.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ def _constrained_optimization(
212212
) -> tuple[float, float]:
213213
options = {}
214214
if self.optimizer == "fmin_l_bfgs_b":
215-
from sklearn.utils.optimize import _check_optimize_result
215+
from sklearn.utils.optimize import _check_optimize_result # type: ignore
216216

217217
for name in LBFGS_CONFIGURABLE_OPTIONS:
218218
if (value := getattr(self, name, None)) is not None:

0 commit comments

Comments
 (0)