-
-
Notifications
You must be signed in to change notification settings - Fork 636
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
base: develop
Are you sure you want to change the base?
Conversation
pyproject.toml is probably not the right place ; see .github/workflows/lint.yml |
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. |
Look like the B005 violations are correctly flagged here. Regarding the 2 FURB105 violations, it's ok to fix errors in |
you can also fix the failure in autogen, as this is not an autogenerated file and also in bootstrap, for sure |
i pushed the fix but it's a bit strange that this check failed. Anything we can do with it? |
I would suggest to wait a few weeks or months until #40415 is merged. |
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? |
ok, I agree with enforcing the checks later |
thanks, @fchapoton. This PR should be ready for review in that case. |
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, good, thanks
sagemathgh-40419: Remove unnecessary empty string in print function <!-- ^ Please provide a concise and informative title. --> <!-- ^ Don't put issue numbers in the title, do this in the PR description below. --> <!-- ^ For example, instead of "Fixes sagemath#12345" use "Introduce new method to calculate 1 + 2". --> <!-- v Describe your changes below in detail. --> <!-- v Why is this change required? What problem does it solve? --> <!-- v If this PR resolves an open issue, please link to it here. For example, "Fixes sagemath#12345". --> Autofix a few [`FURB105`](https://docs.astral.sh/ruff/rules/print-empty- string/) 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 <!-- Put an `x` in all the boxes that apply. --> - [x] The title is concise and informative. - [x] 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 <!-- List all open PRs that this PR logically depends on. For example, --> <!-- - sagemath#12345: short description why this is a dependency --> <!-- - sagemath#34567: ... --> URL: sagemath#40419 Reported by: Trinh Quoc Anh Reviewer(s): Frédéric Chapoton
Autofix a few
FURB105
errors withruff 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 updatingpyproject.toml
with enforceable rules are ok or not. I can revert the second commit if needed.📝 Checklist
⌛ Dependencies