Skip to content

MAINT silence spurious mypy error#20147

Merged
rth merged 1 commit intoscikit-learn:mainfrom
ogrisel:ignore-type-check-in-pytest-metric-tests
May 27, 2021
Merged

MAINT silence spurious mypy error#20147
rth merged 1 commit intoscikit-learn:mainfrom
ogrisel:ignore-type-check-in-pytest-metric-tests

Conversation

@ogrisel
Copy link
Copy Markdown
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
Copy Markdown
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