-
Notifications
You must be signed in to change notification settings - Fork 147
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[MNT] Wrong type annotations for aeon classes #1928
Comments
|
i would like to work on this issue |
Sure! @aeon-actions-bot assign @aryan0931 |
@aryan0931 Are you still working on this? |
no |
I would like to work on this issue. |
I was not able to find more of these incorrect type hints. The ones mentioned earlier are already fixed. Please let me know if there’s anything else you’d like me to check. |
I can confirm that the mentioned issues have been resolved. However, I could find the following additional locations (not as important because private methods, but we are already on it, so why not fix it):
After those are fixed, we can close this IMO. |
@shinymack thank you for your contributions! |
Describe the issue
We started to add Python type hints to our estimators. However, some existing hints for (Aeon) classes are incorrect, e.g.
aeon/aeon/classification/sklearn/_rotation_forest_classifier.py
Lines 108 to 110 in be4af65
Type[BaseEstimator]
references the type of the class (thus,estimatorFactory = BaseEstimator
is of typeType[BaseEstimator]
)BaseEstimator
references an instance of this class (thus,estimator = BaseEstimator()
is of typeBaseEstimator
)Suggest a potential alternative/fix
Because the
RotationForestClassifier
works with an instance asbase_estimator
the correct type would bebase_estimator: BaseEstimator
We need to check the code base for further such issues.
Additional context
No response
The text was updated successfully, but these errors were encountered: