uranusjr commented on code in PR #60966:
URL: https://github.com/apache/airflow/pull/60966#discussion_r2781514827
##########
airflow-core/src/airflow/serialization/definitions/assets.py:
##########
@@ -162,6 +162,10 @@ def asprofile(self) -> AssetProfile:
"""
return AssetProfile(name=self.name or None, uri=self.uri or None,
type="Asset")
+ def __hash__(self):
+ f = attrs.filters.include(*attrs.fields_dict(SerializedAsset))
+ return hash(json.dumps(attrs.asdict(self, filter=f), sort_keys=True))
Review Comment:
Isn’t this more or less the built-in `unsafe_hash` does?
--
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]