ephraimbuddy commented on code in PR #53600:
URL: https://github.com/apache/airflow/pull/53600#discussion_r2240006641
##########
providers/standard/src/airflow/providers/standard/operators/python.py:
##########
@@ -485,9 +484,19 @@ def __init__(
def _iter_serializable_context_keys(self):
pass
+ @staticmethod
+ def context_copy_partial(source: Context, keys: Container[str]) -> Context:
+ """
+ Create a context by copying items under selected keys in ``source``.
+
+ :meta private:
+ """
+ new = {k: v for k, v in source.items() if k in keys}
+ return cast("Context", new)
Review Comment:
It's a static method. Yeah, self is not very right but we can use the class
obj directly. I think it's better than having a function. Fix:
https://github.com/apache/airflow/pull/53600/commits/a98d9f46ece9e271459d68929274a059c043eea8
--
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]