You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by ka...@apache.org on 2025/04/11 20:30:09 UTC

(airflow) branch main updated: Prettifyed airflowctl outputs (#49061)

This is an automated email from the ASF dual-hosted git repository.

kaxilnaik pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git


The following commit(s) were added to refs/heads/main by this push:
     new f671a10ef8e Prettifyed airflowctl outputs (#49061)
f671a10ef8e is described below

commit f671a10ef8eabea1520e7e7b6287ea71fe5fb32c
Author: Aritra Basu <24...@users.noreply.github.com>
AuthorDate: Sat Apr 12 02:00:03 2025 +0530

    Prettifyed airflowctl outputs (#49061)
    
    closes: #48876
---
 airflow-ctl/src/airflowctl/ctl/cli_config.py | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/airflow-ctl/src/airflowctl/ctl/cli_config.py b/airflow-ctl/src/airflowctl/ctl/cli_config.py
index ee4f0268eba..b55c93c9922 100644
--- a/airflow-ctl/src/airflowctl/ctl/cli_config.py
+++ b/airflow-ctl/src/airflowctl/ctl/cli_config.py
@@ -31,6 +31,8 @@ from functools import partial
 from pathlib import Path
 from typing import Any, Callable, NamedTuple, Union
 
+import rich
+
 import airflowctl.api.datamodels.generated as generated_datamodels
 from airflowctl.api.client import NEW_API_CLIENT, Client, ClientKind, provide_api_client
 from airflowctl.api.operations import BaseOperations, ServerResponseError
@@ -418,9 +420,9 @@ class CommandFactory:
 
             if datamodel:
                 method_params = datamodel.model_validate(method_params)
-                print(operation_method_object(method_params))
+                rich.print(operation_method_object(method_params))
             else:
-                print(operation_method_object(**method_params))
+                rich.print(operation_method_object(**method_params))
 
         for operation in self.operations:
             self.func_map[(operation.get("name"), operation.get("parent").name)] = partial(