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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

some pep8 fixes in rings, and activate E221 #37228

Merged
merged 2 commits into from
Feb 13, 2024

Conversation

fchapoton
Copy link
Contributor

This fixes all remaining pycodestyle E221 warnings in py files and activate this check in the pycodestyle-minimal linter.

This is about E221 multiple spaces before operator

馃摑 Checklist

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

Copy link

github-actions bot commented Feb 3, 2024

Documentation preview for this PR (built with commit 9e7a585; changes) is ready! 馃帀

@tscrim
Copy link
Collaborator

tscrim commented Feb 5, 2024

Overall, the changes are fine with me, but I am slightly worried about forcing E221 on code as there could be a good reason to have the spaces (demonstrating an alignment in, e..g, a matrix). It might not happen, but I don't want to force it when it could make the code locally harder to parse.

@fchapoton
Copy link
Contributor Author

fchapoton commented Feb 6, 2024

Well, there is no such case in our code base right now. And pep008 suggest to avoid spaces for alignement:

https://peps.python.org/pep-0008/#pet-peeves

But if you insist, I can remove the activation. Not so important, really.

https://pycodestyle.pycqa.org/en/latest/intro.html#error-codes

Copy link
Collaborator

@tscrim tscrim left a comment

Choose a reason for hiding this comment

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

Indeed, but simple cases versus complicated formulas might matter. Well, we can activate it for now and revisit it if a major example comes up.

vbraun pushed a commit to vbraun/sage that referenced this pull request Feb 7, 2024
    
This fixes all remaining pycodestyle E221 warnings in py files and
activate this check in the pycodestyle-minimal linter.

This is about `E221 multiple spaces before operator`

### 馃摑 Checklist

- [x] The title is concise, informative, and self-explanatory.
- [x] The description explains in detail what this PR is about.
    
URL: sagemath#37228
Reported by: Fr茅d茅ric Chapoton
Reviewer(s): Travis Scrimshaw
@vbraun vbraun merged commit 6b3e764 into sagemath:develop Feb 13, 2024
19 of 20 checks passed
@fchapoton fchapoton deleted the activate_E221 branch February 14, 2024 07:12
@mkoeppe mkoeppe added this to the sage-10.3 milestone Mar 7, 2024
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

4 participants