Closed Harikapl closed 3 months ago
Hey. I believe the problem is that the return type is an union, so just adding assert isinstance(evaluation_result, pd.DataFrame)
should remove that warning.
By the way, we're in the process of changing most of these to use TypeVar
, which should solve your issue as well.
This should be fixed by upgrading the package. Feel free to reopen if the issue persists
I'm encountering a Pylance warning when using the evaluate method from the utilsforecast package. The warning suggests that the method is treating my Pandas DataFrame as a Polars DataFrame (pl_DataFrame), even though I'm not using Polars anywhere in my code.
Warning Details:
Sample code to reproduce:
Expected Behavior:
The method should work without any Pylance warnings since only Pandas DataFrames are used.
Additional Info: I took a quick look at the code and noticed that the evaluate method seems to be designed to handle both Pandas and Polars DataFrames. However, even though I'm using Pandas, it seems like the method might be inferring a Polars DataFrame (pl_DataFrame), which is likely what's causing these warnings.