Nixtla / utilsforecast

https://nixtlaverse.nixtla.io/utilsforecast
Apache License 2.0
42 stars 7 forks source link

use TypeVar to get correct output type #117

Closed jmoralez closed 2 months ago

jmoralez commented 2 months ago

Switches from using Union[pd.DataFrame, pl.DataFrame] in the input and output type signatures to using TypeVar(pd.DataFrame, pl.DataFrame) so that if a function gets pandas as input the inferred output type is also pandas. Same for polars.

This helps the most when coding in an editor with a linter on. Fixes #115

review-notebook-app[bot] commented 2 months ago

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB