I'm not sure -- I think the only case is specifically the one in the issue -- I can't think of others since if it were conditional then there'd probably be a yield in the other arm. maybe this is specifically a cutout for return; yield as the total body?
Activity
Hayashi-Yudai commented on Jun 2, 2023
Uum... I couldn't reproduce this bug.
asottile commented on Jun 2, 2023
yes you've used the workaround.
ikonst commented on Jun 2, 2023
What could be a good heuristic here? That an empty yield statement (without expression) is explicitly allowed to trail a return statement?
asottile commented on Jun 2, 2023
I'm not sure -- I think the only case is specifically the one in the issue -- I can't think of others since if it were conditional then there'd probably be a yield in the other arm. maybe this is specifically a cutout for return; yield as the total body?
ikonst commented on Jun 2, 2023
How about every function having a budget for one bare yield that doesn't get flagged?
ikonst commented on Jun 7, 2023
Planning to address it on top of #15386.