-
Notifications
You must be signed in to change notification settings - Fork 128
Labels
BacklogThis has a good chance to be implemented at some point.This has a good chance to be implemented at some point.Contributors welcome 👋🏻Especially relevant issue/PR for contributors to work on.Especially relevant issue/PR for contributors to work on.Good first issueEasy issue to start to contribute to MAPIEEasy issue to start to contribute to MAPIE
Description
Describe the bug
In residuals.py, _fit_residual_estimator has a return type of Tuple[NDArray, NDArray] but actually returns a RegressorMixin.
This isn't caught by mypy because ignore_missing_imports = True causes sklearn's RegressorMixin to be treated as Any, which is compatible with any return type.
Suggested fix
Add warn_return_any = True to mypy.ini to catch cases where Any is returned from typed functions.
To Reproduce
Steps to reproduce the behavior:
uv run make type-check
Expected behavior
I expect to have an error being raised when such a typing error is present.
Metadata
Metadata
Assignees
Labels
BacklogThis has a good chance to be implemented at some point.This has a good chance to be implemented at some point.Contributors welcome 👋🏻Especially relevant issue/PR for contributors to work on.Especially relevant issue/PR for contributors to work on.Good first issueEasy issue to start to contribute to MAPIEEasy issue to start to contribute to MAPIE