Skip to content

Remove unnecessary empty string in print function #40419

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

Merged
merged 5 commits into from
Jul 25, 2025

Conversation

tqa236
Copy link
Contributor

@tqa236 tqa236 commented Jul 16, 2025

Autofix a few FURB105 errors with ruff check src/sage --select FURB105 --fix in the first commit and enforce the rule in the second commit to avoid regression. Let me know if updating pyproject.toml with enforceable rules are ok or not. I can revert the second commit if needed.

📝 Checklist

  • The title is concise and informative.
  • The description explains in detail what this PR is about.
  • I have linked a relevant issue or discussion.
  • I have created tests covering the changes.
  • I have updated the documentation and checked the documentation preview.

⌛ Dependencies

@fchapoton
Copy link
Contributor

pyproject.toml is probably not the right place ; see .github/workflows/lint.yml

@tqa236
Copy link
Contributor Author

tqa236 commented Jul 16, 2025

thanks a lot for pointing me to that file @fchapoton. I found that the command line is more natural for opt-out rather than opt-in, but I moved it there anyway.

Abusing a bit the scope of this PR, I added the rule B005 here too, as requested by @user202729, if the config works correctly, this PR should fail now but pass after #40415 is merged.

@tqa236
Copy link
Contributor Author

tqa236 commented Jul 16, 2025

Look like the B005 violations are correctly flagged here. Regarding the 2 FURB105 violations, it's ok to fix errors in src/sage_setup/autogen and build/sage_bootstrap? I just assumed autogen is short for autogenerated code (?) and left it out.

@fchapoton
Copy link
Contributor

fchapoton commented Jul 16, 2025

you can also fix the failure in autogen, as this is not an autogenerated file

and also in bootstrap, for sure

@tqa236
Copy link
Contributor Author

tqa236 commented Jul 16, 2025

i pushed the fix but it's a bit strange that this check failed. Anything we can do with it?

@fchapoton
Copy link
Contributor

I would suggest to wait a few weeks or months until #40415 is merged.

@tqa236
Copy link
Contributor Author

tqa236 commented Jul 17, 2025

hi @fchapoton, sorry for not being clear. What surprised me is that the "Synchronize labels" job failed. The Lint job fails as expected.

However, as you (humorously?) pointed out that the dev cycle for a PR that needs a dependency is quite long. It'll be quite inefficient if there are many rules to fix.

I suggest we'll only fix the errors for now and then some times later when we have a few rules to enforce I'll do that at once in a single PR. Will this work for you?

@fchapoton
Copy link
Contributor

ok, I agree with enforcing the checks later

@tqa236
Copy link
Contributor Author

tqa236 commented Jul 18, 2025

thanks, @fchapoton. This PR should be ready for review in that case.

Copy link
Contributor

@fchapoton fchapoton left a comment

Choose a reason for hiding this comment

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

ok, good, thanks

@vbraun vbraun merged commit 239c6f9 into sagemath:develop Jul 25, 2025
19 of 23 checks passed
@tqa236 tqa236 deleted the furb105 branch July 25, 2025 21:08
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.

3 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy