ruff
4eac9baf - [`pep8_naming`] Add fixes `N804` and `N805` (#10215)

Commit
1 year ago
[`pep8_naming`] Add fixes `N804` and `N805` (#10215) ## 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`
Author
Parents
Loading