-
-
Couldn't load subscription status.
- Fork 1.2k
Closed
Labels
False Positive 🦟A message is emitted but nothing is wrong with the codeA message is emitted but nothing is wrong with the code
Milestone
Description
The most efficient way to create a empty generator is to add yield after return. pylint should not add the warning unreachable code for it. https://stackoverflow.com/a/61496399
Steps to reproduce
def func():
return
yieldCurrent behavior
test.py:3:4: W0101: Unreachable code (unreachable)
Expected behavior
No warning
pylint --version output
pylint 2.9.4-dev0
astroid 2.6.3-dev0
Python 3.10.0b3 (v3.10.0b3:865714a117, Jun 17 2021, 09:09:56) [Clang 12.0.5 (clang-1205.0.22.9)]
skeggse
Metadata
Metadata
Assignees
Labels
False Positive 🦟A message is emitted but nothing is wrong with the codeA message is emitted but nothing is wrong with the code