<#7491 Consider adding Flake8 lint for `await` sta...
# github-notifications
q
#7491 Consider adding Flake8 lint for `await` statements inside `for` bodies in @rules Issue created by stuhood A code block in an
@rule
like:
Copy code
results = []
for x in some_collection:
  result = await Get(Y, X, x)
  results.append(result)
...generally represents a missed opportunity for parallelism (because all of the dependency requests could be proceeding in parallel), and should be converted to:
Copy code
results = await MultiGet(Get(Y, X, x) for x in some_collection)
We should examine existing usecases, and if there are no strongly motivating examples for
await-in-for
, consider making it an error. pantsbuild/pants