blag commented on code in PR #24590:
URL: https://github.com/apache/airflow/pull/24590#discussion_r903157917


##########
airflow/utils/cli.py:
##########
@@ -306,11 +298,13 @@ class ColorMode:
     AUTO = "auto"
 
 
-def should_use_colors(args) -> bool:
+def should_use_colors(args_or_color) -> bool:
     """Processes arguments and decides whether to enable color in output"""
-    if args.color == ColorMode.ON:
+    # args.color is from argparse, Click CLI will pass in the color directly
+    color = args.color if hasattr(args, 'color') else args_or_color

Review Comment:
   Backwards compatibility with argparse. I included the comment so we can grep 
for argparse and simplify this once we no longer need argparse.



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

Reply via email to