By using an @overload, on output_type: Literal["dict", "dataframe"] this can be converted used to give the correct type returned.
|
def list_tasks( |
|
task_type: Optional[TaskType] = None, |
|
offset: Optional[int] = None, |
|
size: Optional[int] = None, |
|
tag: Optional[str] = None, |
|
output_format: str = "dict", |
|
**kwargs, |
|
) -> Union[Dict, pd.DataFrame]: |
- Could be partially done for
get_X_and_y, at least for dataframe.
By using an
@overload, onoutput_type: Literal["dict", "dataframe"]this can be converted used to give the correct type returned.openml-python/openml/tasks/functions.py
Lines 129 to 136 in 56895c2
get_X_and_y, at least for dataframe.