New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
False positive implicit yield violation #1057
Comments
What about yield from (
value[index:index + chunk_size]
for index in range(0, len(value), chunk_size)
) ? |
Less readable in my taste. But if no other choices I will use it. Thanks. |
Thanks for raising this, I guess we need to update the violation docs about this case. |
Address issue wemake-services#1057. Update violation docs to make it easier for developers to understand how to refactor more complex yield statements.
Address issue wemake-services#1057. Update violation docs to make it easier for developers to understand how to refactor more complex yield statements.
Address issue wemake-services#1057. Update violation docs to make it easier for developers to understand how to refactor more complex yield statements.
@sobolevn there is still a bug. |
Yes, that's true. |
This rule should be ignored for Can you please add a check that |
Of course, I'll do it. |
Bug report
What's wrong
With common function to split iterable by chunks WPS raises
ImplicitYieldFromViolation
How is that should be
ImplicitYieldFromViolation
should be raised only if no other operations with iterable item.The text was updated successfully, but these errors were encountered: