-
Notifications
You must be signed in to change notification settings - Fork 14.7k
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
Refactor: Replace lambdas with comprehensions #33745
Conversation
airflow/jobs/backfill_job_runner.py
Outdated
sorted_ti_keys = (k[0:4] for k in sorted_ti_keys) | ||
sorted_ti_keys = [k[0:4] for k in sorted_ti_keys] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This does not seem to fit in this PR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh yes, thanks, removed.
@@ -357,7 +357,7 @@ def print_async_summary(completed_list: list[ApplyResult]) -> None: | |||
|
|||
def get_completed_result_list(results: list[ApplyResult]) -> list[ApplyResult]: | |||
"""Return completed results from the list.""" | |||
return list(filter(lambda result: result.ready(), results)) | |||
return [result for result in results if result.ready] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return [result for result in results if result.ready] | |
return [result for result in results if result.ready()] |
You need to make it ready for review @eumiro |
(cherry picked from commit 9a0f54d)
No description provided.