Skip to content

Commit

Permalink
ENH: Avoid type checking for private function import statement
Browse files Browse the repository at this point in the history
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
  • Loading branch information
jhlegarreta committed Dec 21, 2024
1 parent 27be24b commit 87bad32
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/nifreeze/model/gpr.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ def _constrained_optimization(
) -> tuple[float, float]:
options = {}
if self.optimizer == "fmin_l_bfgs_b":
from sklearn.utils.optimize import _check_optimize_result
from sklearn.utils.optimize import _check_optimize_result # type: ignore

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

0 comments on commit 87bad32

Please sign in to comment.