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

[6.12.z] Add Ruff rule group B (flake8-bugbear) #13697

Merged
merged 2 commits into from
Jan 10, 2024

Conversation

JacobCallahan
Copy link
Member

@JacobCallahan JacobCallahan commented Jan 9, 2024

Cherry-pick of #13491

This change includes the rule addition and mostly manual changes to existing code in order to bring it in line with the new rules and avoid as many ignores as is reasonable.

I added a number of {{from err}} statements to the end of exceptions that currently include the error message. The error message being included in the raised string can be removed later, but keeping for consistency for now.

In cases where I raised from None, the raised exception is clear enough that the additional context of the parent exception isn't helpful.

fixes #13690

@JacobCallahan JacobCallahan added Framework Changes A modification of the robottelo framework No-CherryPick PR doesnt need CherryPick to previous branches 6.12.z Introduced in or relating directly to Satellite 6.12 labels Jan 9, 2024
@JacobCallahan JacobCallahan linked an issue Jan 9, 2024 that may be closed by this pull request
This change includes the rule addition and mostly manual changes to
existing code in order to bring it in line with the new rules and avoid
as many ignores as is reasonable.

I added a number of {{from err}} statements to the end of exceptions that currently include the error message. The
error message being included in the raised string can be removed later, but keeping for consistency for now.

In cases where I raised from None, the raised exception is clear enough that the additional context of the parent
exception isn't helpful.

cli/test\_ping.py has a zip that should probably be strict.
@JacobCallahan JacobCallahan changed the title [6.12.z] Ruff bugbear and pytest cherry-picks [6.12.z] Add Ruff rule group B (flake8-bugbear) Jan 9, 2024
@Gauravtalreja1 Gauravtalreja1 merged commit 328f1fb into SatelliteQE:6.12.z Jan 10, 2024
5 checks passed
@JacobCallahan JacobCallahan deleted the 6.12.z branch January 10, 2024 21:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6.12.z Introduced in or relating directly to Satellite 6.12 Framework Changes A modification of the robottelo framework No-CherryPick PR doesnt need CherryPick to previous branches
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Failed-AutoCherryPick] - Add Ruff rule group B (flake8-bugbear)
2 participants