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

a few details in combinat, as suggested by ruff #36392

Merged
merged 4 commits into from
Oct 14, 2023

Conversation

fchapoton
Copy link
Contributor

this is fixing a few things in combinat, as suggested by the very fast linter ruff

📝 Checklist

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

@github-actions
Copy link

github-actions bot commented Oct 3, 2023

Documentation preview for this PR (built with commit 47cbfa7; changes) is ready! 🎉

Copy link
Contributor

@dcoudert dcoudert 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.

@@ -4201,8 +4201,8 @@ def zero_one_sequence(self):
sage: all(Partitions().from_zero_one(mu.zero_one_sequence()) == mu for n in range(10) for mu in Partitions(n))
True
"""
tmp = [self[i]-i for i in range(len(self))]
return ([Integer(not (i in tmp)) for i in range(-len(self)+1,self.get_part(0)+1)])
tmp = [self[i] - i for i in range(len(self))]
Copy link
Contributor

Choose a reason for hiding this comment

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

May be tmp should be a set and not a list. I'm not sure if it is interesting here, and I agree it's not the object of this PR.

Copy link
Contributor

@dcoudert dcoudert left a comment

Choose a reason for hiding this comment

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

LGTM.

@vbraun
Copy link
Member

vbraun commented Oct 8, 2023

merge conflict

@fchapoton
Copy link
Contributor Author

back to positive after trivial resolution of conflict

@vbraun vbraun merged commit 384493c into sagemath:develop Oct 14, 2023
@mkoeppe mkoeppe added this to the sage-10.2 milestone Oct 14, 2023
@fchapoton fchapoton deleted the ruff_for_combinat branch October 15, 2023 06:49
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.

4 participants