Skip to content
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

some fixes for ruff code C41 (about loops and iteration) #38323

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

fchapoton
Copy link
Contributor

a few minor code fixes in various places, about a better use of loops

https://docs.astral.sh/ruff/rules/#flake8-comprehensions-c4

📝 Checklist

  • The title is concise and informative.
  • The description explains in detail what this PR is about.

Copy link

github-actions bot commented Jul 1, 2024

Documentation preview for this PR (built with commit 224e30c; changes) is ready! 🎉
This preview will update shortly after each push to this PR.

nontripts = [i for i in nB1 if i not in pts.keys()]
set_lps = set(lps)
curvedlines = [list(sx.difference(set_lps))
for x in M.flats(2) if (sx := set(x)) not in trilines
Copy link
Member

Choose a reason for hiding this comment

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

is this condition ever true? trilines appears to be a list of lists

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This part of the code looked strange before my changes. I am not sure what is intended by the author.

Copy link
Member

Choose a reason for hiding this comment

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

OK.

Copy link
Member

@mkoeppe mkoeppe left a comment

Choose a reason for hiding this comment

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

Otherwise LGTM

@vbraun
Copy link
Member

vbraun commented Jul 24, 2024

merge conflict

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.

None yet

3 participants