Thanks to visit codestin.com
Credit goes to github.com

Skip to content

MNT: Fix CI for cython-lint 0.21 - #34359

Merged
lorentzenchr merged 1 commit into
scikit-learn:mainfrom
cakedev0:fix-cython-lint
Jun 22, 2026
Merged

MNT: Fix CI for cython-lint 0.21#34359
lorentzenchr merged 1 commit into
scikit-learn:mainfrom
cakedev0:fix-cython-lint

Conversation

@cakedev0

Copy link
Copy Markdown
Contributor

Reference Issues/PRs

Closes #34356

Very similar to #34331

What does this implement/fix? Explain your changes.

  • Bump cython lint rev to 0.21 in precommit.yaml
  • Fixes the new linting errors (I discovered Cython nicely support for _ in range(...) syntax).

@lorentzenchr lorentzenchr left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Hmm. I am fine with this PR.
But I don’t like the _ variables too much (in Cython code).

Comment thread sklearn/cluster/_k_means_common.pyx

@ogrisel ogrisel left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM. I find this way of writing can explicitly convey that the iteration index is not used in the loop.

@lorentzenchr lorentzenchr left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

@lorentzenchr

Copy link
Copy Markdown
Member

I find this way of writing can explicitly convey that the iteration index is not used in the loop.

From Python perspective: Yes 👍. From a C perspective: I haven't seen it (yet).

@lorentzenchr
lorentzenchr merged commit 6e3e447 into scikit-learn:main Jun 22, 2026
42 checks passed
prady0t pushed a commit to prady0t/scikit-learn that referenced this pull request Sep 2, 2026
@jeremiedbb jeremiedbb mentioned this pull request Sep 8, 2026
14 tasks
jeremiedbb pushed a commit to jeremiedbb/scikit-learn that referenced this pull request Sep 9, 2026
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.

Ruff and Cython-lint generates new linting errors

4 participants