eumiro commented on code in PR #33837:
URL: https://github.com/apache/airflow/pull/33837#discussion_r1316222356


##########
airflow/models/mappedoperator.py:
##########
@@ -97,15 +97,11 @@ def validate_mapping_kwargs(op: type[BaseOperator], func: 
ValidationSource, valu
             continue
         for name in param_names:
             value = unknown_args.pop(name, NOTSET)
-            if func != "expand":
-                continue
-            if value is NOTSET:
-                continue
-            if is_mappable(value):
-                continue
-            type_name = type(value).__name__
-            error = f"{op.__name__}.expand() got an unexpected type 
{type_name!r} for keyword argument {name}"
-            raise ValueError(error)
+            if func == "expand" and value is not NOTSET and not 
is_mappable(value):

Review Comment:
   Reduced the code further to more easily spot different exit points.



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