forked from astral-sh/ruff
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
## Summary This PR fixes for `invalid-first-argument` rules. The fixes rename the first argument of methods and class methods to the valid one. References to this argument are also renamed. Fixes are skipped when another argument is named as the valid first argument. The fix is marked as unsafe due The functions for the `N804` and `N805` rules are now merged, as they only differ by the name of the valid first argument. The rules were moved from the AST iteration to the deferred scopes to be in the function scope while creating the fix. ## Test Plan `cargo test`
- Loading branch information
Showing
14 changed files
with
1,098 additions
and
270 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.