nathadfield commented on code in PR #66881:
URL: https://github.com/apache/airflow/pull/66881#discussion_r3247573352


##########
providers/standard/src/airflow/providers/standard/utils/sensor_helper.py:
##########
@@ -144,6 +144,11 @@ def _get_count_by_matched_states(
 ):
     count = 0
     for _, task_states in run_id_task_state_map.items():
-        if all(state in states for state in task_states.values() if state):
+        # Create this list such that len() can be checked in the conditional 
(to handle empty inner)
+        matched_states: list = [state in states for state in 
task_states.values()]
+
+        # An empty inner, such as {"r": {}}, results in count NOT being 
incremented
+        if len(matched_states) > 0  and all(matched_states):

Review Comment:
   @jroachgolf84 Looks like you've got a small formatting issue to deal with.
   ```suggestion
           if len(matched_states) > 0 and all(matched_states):
   ```



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