-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Fix consider-using-augmented-assign
nested attribute access
#8088
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
Conversation
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #8088 +/- ##
==========================================
+ Coverage 95.43% 95.46% +0.03%
==========================================
Files 176 176
Lines 18545 18536 -9
==========================================
- Hits 17698 17695 -3
+ Misses 847 841 -6
|
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.
👌
@@ -2091,7 +2075,7 @@ def _is_target_name_in_binop_side( | |||
return target.name == side.name # type: ignore[no-any-return] | |||
return False | |||
if isinstance(side, nodes.Attribute) and isinstance(target, nodes.AssignAttr): | |||
return get_full_name_of_attribute(target) == get_full_name_of_attribute(side) | |||
return target.as_string() == side.as_string() # type: ignore[no-any-return] |
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.
Well that's clever ! And probably faster too.
Fix ``consider-using-augmented-assign`` checker for nested attribute access. | ||
|
||
Closes #8086 |
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.
Nvm, could you remove this fragment as the checker was not released yet ?
This comment has been minimized.
This comment has been minimized.
We messed up when reading the primer in previous merge request 😅 |
Description
Closes #8086