The Returns section of the docstring for sklearn.datasets.load_iris() has two options:
- An
sklearn.utils.Bunch, if return_X_y is False - A
tuple[ndarray, ndarray] if return_X_y is True
The type stub for the function is
defload_iris(*, return_X_y: bool=False, as_frame: bool=False) ->tuple[Bunch, tuple]: ...
but I believe it should be:
defload_iris(*, return_X_y: bool=False, as_frame: bool=False) ->Bunch|tuple[ndarray, ndarray]: ...
or at least:
defload_iris(*, return_X_y: bool=False, as_frame: bool=False) ->Bunch|tuple: ...
which might be all we can get with parsing.
This might not be the only case of this in the codebase, but unfortunately I just have enough time to write this ticket. Normally I like to come with a bit more information, sorry about that.
The
Returnssection of the docstring forsklearn.datasets.load_iris()has two options:sklearn.utils.Bunch, ifreturn_X_yisFalsetuple[ndarray, ndarray]ifreturn_X_yisTrueThe type stub for the function is
but I believe it should be:
or at least:
which might be all we can get with parsing.
This might not be the only case of this in the codebase, but unfortunately I just have enough time to write this ticket. Normally I like to come with a bit more information, sorry about that.