Open dscorbett opened 3 months ago
Interesting. It shouldn't be to hard to not flag the rule in this case. Just wondering, what's the real world code where you found this issue because a string literal probably indicates a missing assignment (or return, ...).?
This is just something theoretical I noticed while reading the rule description. I agree that anything that looks like my sample code probably has a bug. I think PIE790 should still flag it, just not automatically fix it.
There is one case where the fix for PIE790 is not completely safe: it changes behavior when the placeholder statement is blocking a string from being a docstring.