You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2022/07/27 17:07:19 UTC

[GitHub] [airflow] Taragolis commented on a diff in pull request #25248: WIP: Serialized object property

Taragolis commented on code in PR #25248:
URL: https://github.com/apache/airflow/pull/25248#discussion_r931305254


##########
airflow/utils/helpers.py:
##########
@@ -376,3 +376,16 @@ def is_empty(x):
         return new_list
     else:
         return val
+
+
+def resolve_property_value(obj, prop):
+    """Return class property value.
+
+    :param obj: Reference to class.
+    :param prop: Reference to class property.
+    :returns: If ``prop`` property than return property value,
+        otherwise it returns class attribute value.
+    """
+    if isinstance(prop, property):
+        return prop.fget(obj)
+    return prop

Review Comment:
   Just to clarify - is it related to Operator?



-- 
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-unsubscribe@airflow.apache.org

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