ashb commented on code in PR #43076:
URL: https://github.com/apache/airflow/pull/43076#discussion_r1823021972


##########
airflow/models/dag.py:
##########
@@ -332,34 +294,28 @@ def _create_orm_dagrun(
     return run
 
 
-# TODO: The following mapping is used to validate that the arguments passed to 
the DAG are of the correct
-#  type. This is a temporary solution until we find a more sophisticated 
method for argument validation.
-#  One potential method is to use `get_type_hints` from the typing module. 
However, this is not fully
-#  compatible with future annotations for Python versions below 3.10. Once we 
require a minimum Python
-#  version that supports `get_type_hints` effectively or find a better 
approach, we can replace this
-#  manual type-checking method.
-DAG_ARGS_EXPECTED_TYPES = {
-    "dag_id": str,
-    "description": str,
-    "max_active_tasks": int,
-    "max_active_runs": int,
-    "max_consecutive_failed_dag_runs": int,
-    "dagrun_timeout": timedelta,
-    "default_view": str,
-    "orientation": str,
-    "catchup": bool,
-    "doc_md": str,
-    "is_paused_upon_creation": bool,
-    "render_template_as_native_obj": bool,
-    "tags": Collection,
-    "auto_register": bool,
-    "fail_stop": bool,
-    "dag_display_name": str,
-}
+if TYPE_CHECKING:
+    dag = task_sdk_dag_decorator
+else:
+
+    def dag(dag_id: str = "", **kwargs):

Review Comment:
   Which bit of this?



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