Andrushika opened a new pull request, #76345:
URL: https://github.com/apache/airflow/pull/76345

   ## Why
   
   airflowctl builds its argparse parser from a tree of command objects. 
`GroupCommand` is a node with subcommands, and `ActionCommand` is a leaf.
   
   #49024 added `GroupCommandParser`. It has the same fields as `GroupCommand`, 
except `api_operation`. The parser converts `GroupCommand` to 
`GroupCommandParser` in three places: `ALL_COMMANDS_DICT`, `get_parser()` and 
`_add_command()`.
   
   argparse never reads either type. The help formatter only uses the type to 
put groups and commands in separate sections.
   
   Nothing reads `api_operation` either. #48146 added it, and 
`merge_commands()` only copies it to the merged command.
   
   ## What
   
   Remove `GroupCommandParser` and `GroupCommand.api_operation`. The airflowctl 
parser now uses `GroupCommand` directly, the same as the airflow-core CLI 
parser.
   
   There is no behaviour change. I compared the `--help` output of all 119 
parsers in the command tree before and after this change, and it is the same.
   
   ---
   
   ##### Was generative AI tooling used to co-author this PR?
   
   - [X] Yes (please specify the tool below)
   
   Generated-by: Claude Code (Opus 5.5) following [the 
guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#gen-ai-assisted-contributions)
   


-- 
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]

  • [PR] Remove duplicate GroupCo... Andrushika (via GitHub) via commits

Reply via email to