-
Notifications
You must be signed in to change notification settings - Fork 82
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
chore(RHINENG-14059): Add Ruff ARG rule (WIP) #2181
base: master
Are you sure you want to change the base?
Conversation
@@ -103,7 +103,7 @@ def test_create_assignemnt_rule_same_group(api_create_assign_rule, db_create_gro | |||
assert group in response_data["detail"] | |||
|
|||
|
|||
def test_create_assignment_rule_RBAC_denied(subtests, mocker, api_create_assign_rule, db_create_group, enable_rbac): | |||
def test_create_assignment_rule_RBAC_denied(subtests, mocker, api_create_assign_rule, db_create_group, _enable_rbac): |
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.
If a test needs to use a fixture, but it doesn't use its return value, you can decorate the test with @pytest.mark.usefixtures("fixture_name")
and then you don't have to include this fixture in the test arguments.
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.
Fantastic, thanks a ton for the info! I'll switch to using that, as it's simpler
There were initially 295 lint errors; now we're down to 141 (not including the fixes that #2183 will bring) |
Overview
This PR is being created to address RHINENG-14059.
Adds the ARG rule to Ruff, and fixes the code that breaks the rule.
NOTE: This PR is a collaborative work-in-progress. In order to contribute, you must do the following:
pyproject.toml
, uncomment lines 21 and 38 ("ARG" and "ignore-variadic-names")make style
When we are ready to merge the PR, we will need to uncomment the lines from step 1.
PR Checklist
Secure Coding Practices Documentation Reference
You can find documentation on this checklist here.
Secure Coding Checklist