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

Fix rename in place of first non-posonlyarg #111

Merged
merged 2 commits into from
Oct 3, 2024

Conversation

dflook
Copy link
Owner

@dflook dflook commented Oct 3, 2024

The first non-posonly arg in a method definition was mistakenly thought to be 'self' and eligible for renaming in place.
This change accounts for any posonly args when considering the 'first' argument to a method.

e.g my_arg will no longer be renamed in place:

class MyClass
  def my_method(self, /, my_arg): pass

The first non-posonly arg in a method definition was mistakenly thought to be 'self' and eligible for renaming in place.
This change accounts for any posonly args when considering the 'first' argument to a method.

e.g arg will no longer be renamed in place:
```python
class MyClass
  def my_method(self, /, my_arg): pass
```
The first non-posonly arg in a method definition was mistakenly thought to be 'self' and eligible for renaming in place.
This change accounts for any posonly args when considering the 'first' argument to a method.

e.g arg will no longer be renamed in place:
```python
class MyClass
  def my_method(self, /, my_arg): pass
```
@dflook dflook merged commit e9d60cf into main Oct 3, 2024
81 checks passed
@dflook dflook deleted the posarg-self-rename-in-place branch October 3, 2024 18:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant