-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? # to your account
fix unnecessary-comprehension provides incorrect suggestion #9172
fix unnecessary-comprehension provides incorrect suggestion #9172
Conversation
This comment has been minimized.
This comment has been minimized.
@jacobtylerwalls i am a beginner and having a hard time solving can you help me what i have to do to solve the issue. it would be a great help! thanks |
I'm on mobile si I can't link the specific code but the message is raised in the add_message function, the message is dynamic and the argument given to add_message used in %s later is what need to be modified. |
for more information, see https://pre-commit.ci
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #9172 +/- ##
==========================================
+ Coverage 95.76% 95.79% +0.02%
==========================================
Files 173 173
Lines 18692 18722 +30
==========================================
+ Hits 17901 17935 +34
+ Misses 791 787 -4
|
This comment has been minimized.
This comment has been minimized.
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.
Thank you for your contribution, it looks promising, do you mind adding the functional tests from #8577
a = [[1, 2], [3, 4]]
b = [(x, y) for x, y in a] # flagged as unnecessary-comprehension
And #9109:
#pylint: disable=missing-module-docstring
a = [1, 2, 3]
b = [x for x in a]
b[0] = 0
print(a) # [1, 2, 3]
in tests/functional/u/unnecessary/unnecessary_comprehension.py, please ?
Also a bug / or false positive changelog fragment would be nice for this one. |
in the unnecessary_comprehension.py on line 5 it can be use for 9109 and |
where to do that in the doc/whatsnew/fragment or any where else and what it would be helpfull thanks! |
Check out the contributor docs for some info on documenting your pull request. |
for more information, see https://pre-commit.ci
This comment has been minimized.
This comment has been minimized.
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.
Thanks for the news entry! Spotted one typo.
Thanks for the contribution! π |
π€ Effect of this PR on checked open source code: π€ Effect on sentry:
The following messages are no longer emitted:
This comment was generated for commit 1bc8f5e |
requested test coverage added
(cherry picked from commit 6f83d5a)
Type of Changes
Description
Closes #9109