Suraj-kumar00 commented on code in PR #67947:
URL: https://github.com/apache/airflow/pull/67947#discussion_r3351399330


##########
airflow-ctl/src/airflowctl/ctl/cli_config.py:
##########
@@ -52,6 +54,43 @@
 BUILD_DOCS = "BUILDING_AIRFLOW_DOCS" in os.environ
 
 
+def _is_list_annotation(annotation: Any) -> bool:
+    """Check whether a Pydantic field annotation is a list type (including 
Optional[list[...]])."""
+    origin = typing.get_origin(annotation)
+    if origin is list:
+        return True
+    # Handle both typing.Union (Optional[list[...]]) and PEP-604 X | Y 
(types.UnionType)
+    if origin is typing.Union or isinstance(annotation, 
builtin_types.UnionType):
+        return any(_is_list_annotation(arg) for arg in 
typing.get_args(annotation) if arg is not type(None))
+    return False
+
+
+def _parse_task_ids_cli_arg(value: str) -> list:

Review Comment:
   Moved _parse_task_ids_cli_arg to operations.py and remove the special-case 
from cli_config.py.



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