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

Enable more ruff rules #6057

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

KKoukiou
Copy link
Contributor

No description provided.

@github-actions github-actions bot added the f42 Fedora 42 label Dec 18, 2024
@pep8speaks
Copy link

pep8speaks commented Dec 18, 2024

Hello @KKoukiou! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:

There are currently no PEP 8 issues detected in this Pull Request. Cheers! 🍻

Comment last updated at 2025-01-03 14:48:12 UTC

@KKoukiou
Copy link
Contributor Author

/kickstart-tests --testtype smoke

Copy link
Member

@jkonecny12 jkonecny12 left a comment

Choose a reason for hiding this comment

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

Looks good to me otherwise but I'm not happy about two changes which makes harder readability.

prompt.add_option("1", _("to enter the %(spoke_title)s spoke") % {"spoke_title": list(self._spokes.values())[0].title})
prompt.add_option(
"1",
_("to enter the %(spoke_title)s spoke") % {"spoke_title": next(iter(self._spokes.values())).title}
Copy link
Member

Choose a reason for hiding this comment

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

Honestly, this doesn't look like improvement. It's harder to read and understand.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

So keep this rule disabled ?

Copy link
Member

Choose a reason for hiding this comment

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

I would prefer that.

Copy link
Member

Choose a reason for hiding this comment

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

I mean using next is fine but it's harder to understand. At least for me.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok removed this commit.

Comment on lines 1284 to 1287
# we're looking for the original vg name
idx = next((i for i, data in enumerate(self._containerStore) if data[0] == container_name), None)

for idx, data in enumerate(self._containerStore):
# we're looking for the original vg name
if data[0] == container_name:
break

if idx:
if idx is not None:
Copy link
Member

Choose a reason for hiding this comment

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

Again doesn't look to me like improvement.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

So keep this rule disabled ?
Or only this occurrence?

I dont have preference.

Copy link
Member

Choose a reason for hiding this comment

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

Yes, that would be my personal preference.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok removed this commit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
f42 Fedora 42
Development

Successfully merging this pull request may close these issues.

3 participants