Eason09053360 opened a new pull request, #72109: URL: https://github.com/apache/airflow/pull/72109
`DAG.cli()` dispatches every subcommand with the Dag object as a second positional argument, because its parser drops `--dag-id`. The `dags pause` and `dags unpause` handlers never accepted it, so running a Dag file as a script raised `TypeError: dag_pause() takes 1 positional argument but 2 were given` instead of the command. The regular `airflow dags pause --dag-id foo` path has always worked, which is why this went unnoticed — the handlers are only reachable with two arguments from a Dag file. --- ##### Was generative AI tooling used to co-author this PR? - [X] Yes — Claude Code (Opus 5) Generated-by: Claude Code (Opus 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]
