uranusjr commented on code in PR #41264:
URL: https://github.com/apache/airflow/pull/41264#discussion_r1705267718


##########
airflow/datasets/__init__.py:
##########
@@ -336,6 +342,14 @@ def iter_datasets(self) -> Iterator[tuple[str, Dataset]]:
                 yield k, v
                 seen.add(k)
 
+    def iter_dataset_aliases(self) -> Iterator[DatasetAlias]:
+        """Filter dataest aliases in the condition."""
+        for o in self.objects:
+            if isinstance(o, _DatasetAliasCondition):
+                yield DatasetAlias(o.name)

Review Comment:
   Since `_DatasetAliasCondition` already implements this yield, the if-else 
condition does not seem needed? This can just be
   
   ```python
   for o in self.objects:
       yield from o.iter_dataset_aliases()
   ```



-- 
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: commits-unsubscr...@airflow.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to