Skip to content
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

[Backport maintenance/3.2.x] Fix false positive in use-yield-from when using yield return #9701

Merged

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented Jun 6, 2024

Backport ea73bae from #9700.

If the return value from `yield` is inspected inline, such as by
(augmented) assignment, changing the looped `yield` to `yield from` is
very likely to change the semantics of the generator, since there is an
implicit use of `generator.send`.

Closes #9696

(cherry picked from commit ea73bae)
@Pierre-Sassoulas Pierre-Sassoulas added the False Positive 🦟 A message is emitted but nothing is wrong with the code label Jun 6, 2024
@Pierre-Sassoulas Pierre-Sassoulas enabled auto-merge (squash) June 6, 2024 12:54
@Pierre-Sassoulas Pierre-Sassoulas added this to the 3.2.3 milestone Jun 6, 2024
Copy link

codecov bot commented Jun 6, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.82%. Comparing base (192727b) to head (f39f87a).
Report is 27 commits behind head on maintenance/3.2.x.

Additional details and impacted files

Impacted file tree graph

@@                Coverage Diff                 @@
##           maintenance/3.2.x    #9701   +/-   ##
==================================================
  Coverage              95.82%   95.82%           
==================================================
  Files                    174      174           
  Lines                  18827    18827           
==================================================
  Hits                   18041    18041           
  Misses                   786      786           
Files with missing lines Coverage Δ
pylint/checkers/refactoring/refactoring_checker.py 98.27% <100.00%> (ø)

@Pierre-Sassoulas Pierre-Sassoulas merged commit 8aba7d1 into maintenance/3.2.x Jun 6, 2024
25 checks passed
@Pierre-Sassoulas Pierre-Sassoulas deleted the backport-9700-to-maintenance/3.2.x branch June 6, 2024 13:10
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
False Positive 🦟 A message is emitted but nothing is wrong with the code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants