Skip to content

MAINT silence spurious mypy error #20147

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

Merged

Conversation

ogrisel
Copy link
Member

@ogrisel ogrisel commented May 27, 2021

On the main branch, mypy sklearn reports:

sklearn/metrics/tests/test_common.py:824: error: List item 0 has incompatible type "float"; expected "int"

I believe this is a spurious detection. Although that might reveal that we should raise TypeError instead of ValueError for this case? I don't think it's making the input checks more complex.

Copy link
Member

@rth rth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@rth rth merged commit 99472de into scikit-learn:main May 27, 2021
@ogrisel ogrisel deleted the ignore-type-check-in-pytest-metric-tests branch May 27, 2021 11:34
thomasjpfan pushed a commit to bsun94/scikit-learn that referenced this pull request Jun 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants