-
Notifications
You must be signed in to change notification settings - Fork 359
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
tests: ruff: enforce UP032 (f-string) rule #5725
Conversation
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.
Obviously these were autofixed:
ruff check --fix --select UP032 .
These were uncovered with the f-string porting: Let's autfix these as well with: ruff check --fix --select RUF010 .
d839e12
to
8417ef2
Compare
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.
@vojtechtrefny do you know if there is any reason to not do this?
/build-image |
/kickstart-test --testtype smoke |
Images built based on commit 8417ef2:
Download the images from the bottom of the job status page. |
This change is against Code conventions set by the team: https://anaconda-installer.readthedocs.io/en/latest/contributing.html#code-conventions
Reason we went with this was that we did not wanted to mixup f-strings with format and format is not able to cover all the cases. We can definitely reconsider this solution again but I'm marking this as blocked as it's against the current code conventions we have set. |
As I mentioned in the past as well, this file is read by noone, it's not enforced actively and only the ultra old team members might be able to refer to it like you did now. So, on the decision for fstrings - I actually think it's the way to go, the only place it does not apply is the pango templates, because of the custom pocketlint checks, which are not covering fstrings (see commit message) Otherwise, we should really be able to delete the conventions file. |
@jkonecny12 which cases does fstrings does not cover? |
Ahh, my memory is failing here. IIRC f-strings can't be modified before you will mark them as |
Can you elaborate here a bit more? |
TODO: