Skip to content

Commit

Permalink
refactor(utils/context): remove redundant iter call
Browse files Browse the repository at this point in the history
Co-authored-by: Tzu-ping Chung <[email protected]>
  • Loading branch information
Lee-W and uranusjr authored Dec 9, 2024
1 parent 7140d60 commit 5ea5eac
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions airflow/utils/context.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,8 +208,9 @@ def __str__(self) -> str:
return f"OutletEventAccessors(_dict={self._dict})"

def __iter__(self) -> Iterator[Asset | AssetAlias]:
return iter(
key.to_asset() if isinstance(key, AssetUniqueKey) else key.to_asset_alias() for key in self._dict
return (
key.to_asset() if isinstance(key, AssetUniqueKey) else key.to_asset_alias()
for key in self._dict
)

def __len__(self) -> int:
Expand Down

0 comments on commit 5ea5eac

Please sign in to comment.