amoghrajesh commented on code in PR #53600:
URL: https://github.com/apache/airflow/pull/53600#discussion_r2238633816
##########
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:
`self.context_copy_partial` doesn't seem too right, maybe just have it as a
method not bound to a class?
--
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]