-
-
Notifications
You must be signed in to change notification settings - Fork 515
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
Conversation
Documentation preview for this PR (built with commit ceb9913; changes) is ready! 🎉 |
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 |
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.
is this condition ever true? trilines
appears to be a list of lists
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.
This part of the code looked strange before my changes. I am not sure what is intended by the author.
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.
OK.
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.
Otherwise LGTM
merge conflict |
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.
LGTM
…tion) a few minor code fixes in various places, about a better use of loops https://docs.astral.sh/ruff/rules/#flake8-comprehensions-c4 ### 📝 Checklist - [x] The title is concise and informative. - [x] The description explains in detail what this PR is about. URL: sagemath#38323 Reported by: Frédéric Chapoton Reviewer(s): Frédéric Chapoton, Matthias Köppe
a few minor code fixes in various places, about a better use of loops
https://docs.astral.sh/ruff/rules/#flake8-comprehensions-c4
📝 Checklist