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


##########
airflow/models/dagrun.py:
##########
@@ -839,25 +839,43 @@ def task_filter(task: "Operator") -> bool:
 
         if hook_is_noop:
 
-            def create_ti_mapping(task: "Operator") -> dict:
-                created_counts[task.task_type] += 1
-                return TI.insert_mapping(self.run_id, task, map_index=-1)
+            def create_ti_mapping(task: "Operator") -> List[dict]:
+                if isinstance(task, MappedOperator):

Review Comment:
   Complains with what error specifically, because it is there 
https://github.com/apache/airflow/blob/436c17c655494eff5724df98d1a231ffa2142253/airflow/models/baseoperator.py#L1479
   
   A useful thing: what type does mypy think `task` is here.
   ```suggestion
                   reveal_type(task)
                   if task.is_mapped:
   ```
   
   And then run mypy, and it will print out info about `task` at mypy (this is 
not a real function, nothing is needed to be imported, it is just for mypy)



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