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

fixing some E502 (unnecessary backslash) in pyx files #35206

Merged
merged 2 commits into from
Mar 26, 2023

Conversation

fchapoton
Copy link
Contributor

πŸ“š Description

This removes most instances of pycodestyle warning

E502 the backslash is redundant between brackets

inside pyx files. There remains only a few in rings/, that could be easily fixed when activiting the check in the linter.

πŸ“ Checklist

  • I have made sure that the title is self-explanatory and the description concisely explains the PR.
  • I have linked an issue or discussion.
  • I have created tests covering the changes.
  • I have updated the documentation accordingly.

βŒ› Dependencies

@codecov-commenter
Copy link

codecov-commenter commented Feb 26, 2023

Codecov Report

Base: 88.57% // Head: 88.59% // Increases project coverage by +0.01% πŸŽ‰

Coverage data is based on head (436e2ed) compared to base (52a81cb).
Patch has no changes to coverable lines.

❗ Current head 436e2ed differs from pull request most recent head 9e7bf7d. Consider uploading reports for the commit 9e7bf7d to get more accurate results

Additional details and impacted files
@@             Coverage Diff             @@
##           develop   #35206      +/-   ##
===========================================
+ Coverage    88.57%   88.59%   +0.01%     
===========================================
  Files         2140     2140              
  Lines       397273   397273              
===========================================
+ Hits        351891   351969      +78     
+ Misses       45382    45304      -78     
Impacted Files Coverage Ξ”
src/sage/modular/local_comp/liftings.py 98.33% <0.00%> (-1.67%) ⬇️
src/sage/groups/generic.py 88.34% <0.00%> (-0.68%) ⬇️
src/sage/modular/modform/numerical.py 94.19% <0.00%> (-0.65%) ⬇️
...sage/geometry/hyperbolic_space/hyperbolic_model.py 88.95% <0.00%> (-0.62%) ⬇️
src/sage/doctest/reporting.py 74.45% <0.00%> (-0.44%) ⬇️
src/sage/graphs/graph_plot.py 84.33% <0.00%> (-0.29%) ⬇️
src/sage/modules/free_module.py 87.93% <0.00%> (-0.07%) ⬇️
src/sage/sandpiles/sandpile.py 90.92% <0.00%> (-0.07%) ⬇️
src/sage/combinat/tableau.py 96.11% <0.00%> (-0.05%) ⬇️
src/sage/graphs/generators/random.py 92.46% <0.00%> (ΓΈ)
... and 18 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

β˜” View full report at Codecov.
πŸ“’ Do you have feedback about the report comment? Let us know in this issue.

@dcoudert
Copy link
Contributor

dcoudert commented Feb 26, 2023

You let some \ in src/sage/rings/polynomial/pbori/pbori.pyx that can be removed by using some (...).

@fchapoton
Copy link
Contributor Author

I have removed one of them, and also some empty lines and unused imports.
Most of the remaining backslashes are used to break long lines starting with if. I feel it would not look nicer by adding parentheses instead. And this is not the goal here.

@github-actions
Copy link

Documentation preview for this PR is ready! πŸŽ‰
Built with commit: 9e7bf7d

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 vbraun merged commit 4452928 into sagemath:develop Mar 26, 2023
@mkoeppe mkoeppe added this to the sage-10.0 milestone Mar 26, 2023
@fchapoton fchapoton deleted the remove_backslash_pyx branch July 16, 2023 19:18
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

6 participants