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


##########
task-sdk/src/airflow/sdk/definitions/asset/decorators.py:
##########
@@ -57,6 +57,12 @@ def __init__(self, *, definition_name: str, uri: str | None 
= None, **kwargs) ->
     @classmethod
     def from_definition(cls, definition: AssetDefinition | 
MultiAssetDefinition) -> Self:
         _validate_asset_function_arguments(definition._function)
+
+        if isinstance(definition, AssetDefinition):
+            definition_name = definition.name
+        else:
+            definition_name = definition._function.__name__

Review Comment:
   > MultiAssetDefinition can be updated to have name property that always 
takes the function name to remove this check
   
   Yup, that's what I meant



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