Nishieee commented on code in PR #67016:
URL: https://github.com/apache/airflow/pull/67016#discussion_r3291009215
##########
providers/microsoft/azure/src/airflow/providers/microsoft/azure/hooks/wasb.py:
##########
@@ -271,6 +272,17 @@ def check_for_prefix(self, container_name: str, prefix:
str, **kwargs) -> bool:
blobs = self.get_blobs_list(container_name=container_name,
prefix=prefix, **kwargs)
return bool(blobs)
+ def check_for_container(self, container_name: str) -> bool:
+ """
+ Check if a container exists on Azure Blob Storage.
+
+ :param container_name: Name of the container.
+ :return: True if the container exists, False otherwise.
+ """
+ container = self._get_container_client(container_name)
+ self.check_for_variable_type("container", container, ContainerClient)
+ return cast("ContainerClient", container).exists()
Review Comment:
should I change something on my end here, or were you mainly pointing out
that this pattern is already being used in a few other places?
--
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]