-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Emit assignment-from-no-return for builtin methods like dict.update() #8817
Emit assignment-from-no-return for builtin methods like dict.update() #8817
Conversation
This comment has been minimized.
This comment has been minimized.
(Calls to ``list.sort()`` now raise ``assignment-from-no-return`` | ||
rather than ``assignment-from-none`` for consistency.) |
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.
You added that 2 days ago in #8809, right ? We probably don't need to advertise the change as it's unreleased.
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.
(Calls to ``list.sort()`` now raise ``assignment-from-no-return`` | |
rather than ``assignment-from-none`` for consistency.) |
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.
Actually, it's changed in this PR. In #8809 I added all the other methods besides list.sort() to the existing assignment-from-none
, which is only correct if we were going to merge the messages. :-)
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.
list.sort() only was special-cased in #5738
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #8817 +/- ##
=======================================
Coverage 95.89% 95.89%
=======================================
Files 173 173
Lines 18508 18508
=======================================
Hits 17749 17749
Misses 759 759
|
π€ According to the primer, this change has no effect on the checked open source code. π€π This comment was generated for commit 0c0d952 |
Type of Changes
Description
Follow-up to 32effc5.
Since we won't be merging
assignment-from-no-return
withassignment-from-none
, we should emit the correct message for builtins likelist.sort()
anddict.update()
. Onlylist.sort()
is a behavior change from stable versions.Closes #8810