Skip to content

[Typing] list_tasks can be made more explicit in return type with @overload #1299

@eddiebergman

Description

@eddiebergman

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions