openml / openml-python

Python module to interface with OpenML
https://openml.github.io/openml-python/main/
Other
276 stars 142 forks source link

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

Closed eddiebergman closed 6 months ago

eddiebergman commented 6 months ago

By using an @overload, on output_type: Literal["dict", "dataframe"] this can be converted used to give the correct type returned.

https://github.com/openml/openml-python/blob/56895c252dccb0ef9550f73b1694c62965b85abd/openml/tasks/functions.py#L129-L136