for task in tasks
Power through repetitive tasks
Catch and fix quality issues before they enter your code to have fewer bugs, greater velocity, and happier teams.
rules:
- id: filter-lambda-to-list-comprehension
pattern: |
list(filter(lambda ${arg}: ${expr}, ${items}))
replacement: |
[${arg} for ${arg} in ${items} if ${expr}]
description: |
Use list comprehensions instead of filter and lambda