uranusjr commented on a change in pull request #19912:
URL: https://github.com/apache/airflow/pull/19912#discussion_r764959107
##########
File path: airflow/cli/commands/cheat_sheet_command.py
##########
@@ -38,7 +37,13 @@ def display_recursive(
):
actions: List[ActionCommand]
groups: List[GroupCommand]
- actions_iter, groups_iter = partition(lambda x: isinstance(x,
GroupCommand), commands)
+ actions_iter: List[ActionCommand] = []
+ groups_iter: List[GroupCommand] = []
+ for command in commands:
+ if isinstance(command, GroupCommand):
+ groups_iter.append(command)
+ else:
+ actions_iter.append(command)
actions, groups = list(actions_iter), list(groups_iter)
Review comment:
```suggestion
actions: List[ActionCommand] = []
groups: List[GroupCommand] = []
for command in commands:
if isinstance(command, GroupCommand):
groups.append(command)
else:
actions.append(command)
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]