-
-
Notifications
You must be signed in to change notification settings - Fork 25.9k
MNT properly activate the env in the linting CI #17177
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,7 +21,8 @@ | |
from ..neighbors import DistanceMetric | ||
from ..neighbors._dist_metrics import METRIC_MAPPING | ||
|
||
from . import _hierarchical_fast as _hierarchical | ||
# mypy error: Module 'sklearn.cluster' has no attribute '_hierarchical_fast' | ||
from . import _hierarchical_fast as _hierarchical # type: ignore | ||
Comment on lines
+24
to
+25
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. mypy doesn't like Cython files?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah, normally one currently has to write stub files for cython extensions since they don't expose annotations (see e.g. scipy/scipy#11936). I'm hoping this could be done automatically in the future though, since Cython should have all relevant information; possibly cython/cython#2552. Edit: though actually maybe the issues with imports we are seeing are different. Could be worth investigating. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. When There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, indeed. For most Cython imports errors will be ignored due to the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Also I'm getting these errors locally with scikit-learn correctly build. E.g. without this change,
I don't really understand why the full run succeeds.. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Probably unrelated, but lately I've found that There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Yes, linting the diff has issues #11336 (comment) and I would like to start dealing with it once we are done with the release. |
||
from ._feature_agglomeration import AgglomerationTransform | ||
from ..utils._fast_dict import IntFloatDict | ||
from ..utils.fixes import _astype_copy_false | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Print executed commands and exit on first failure.