MrGeorgeOwl commented on code in PR #28230:
URL: https://github.com/apache/airflow/pull/28230#discussion_r1054546446
##########
airflow/providers/cncf/kubernetes/operators/kubernetes_pod.py:
##########
@@ -437,6 +442,10 @@ def hook(self) -> KubernetesHook:
def client(self) -> CoreV1Api:
return self.hook.core_v1_client
+ def get_hook(self):
+ warnings.warn("get_hook is deprecated. Please use hook instead.",
DeprecationWarning, stacklevel=2)
+ return self.hook
+
Review Comment:
It is little refactoring for improving code readability so all cached
methods and hook properties can be found in the same place
--
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]