From 107fb12541be99d1374e3551b0ccf52ebbbc2c29 Mon Sep 17 00:00:00 2001 From: Pankaj Koti Date: Fri, 23 Aug 2024 16:47:13 +0530 Subject: [PATCH] Change deprecation status to Yes/No instead of icons (#1572) Address feedback from @lzdanski on the deprecation status text --- astronomer/providers/microsoft/azure/hooks/wasb.py | 2 +- docs/_ext/traverse_operators_sensors.py | 13 ++++++------- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/astronomer/providers/microsoft/azure/hooks/wasb.py b/astronomer/providers/microsoft/azure/hooks/wasb.py index 0df2736cf..56afbe3d4 100644 --- a/astronomer/providers/microsoft/azure/hooks/wasb.py +++ b/astronomer/providers/microsoft/azure/hooks/wasb.py @@ -87,7 +87,7 @@ def get_conn(self) -> BlobServiceClient: # type: ignore[override] **extra, ) - def _get_blob_client(self, container_name: str, blob_name: str) -> BlobClient: # type: ignore[override] + def _get_blob_client(self, container_name: str, blob_name: str) -> BlobClient: """ Instantiate a blob client. diff --git a/docs/_ext/traverse_operators_sensors.py b/docs/_ext/traverse_operators_sensors.py index 5d21b14e3..ba29fe0ce 100644 --- a/docs/_ext/traverse_operators_sensors.py +++ b/docs/_ext/traverse_operators_sensors.py @@ -53,7 +53,6 @@ def collect_elements( module = importlib.import_module(module_import_path) cls = getattr(module, element_name) is_deprecated = bool(getattr(cls, "is_deprecated", False)) - # is_deprecated = "✅" if getattr(cls, "is_deprecated", False) else "❌" post_deprecation_replacement = str(getattr(cls, "post_deprecation_replacement", "")) elements_list.append( (element_name, is_deprecated, module_import_path, post_deprecation_replacement) @@ -93,7 +92,7 @@ def run(self): "" "" "" - "" + "" "" ) for index, operator in enumerate(operators, start=1): @@ -102,10 +101,10 @@ def run(self): f"" f"" f"" ) if operator[1]: - operators_html += "" + operators_html += "" operators_html += f"" else: - operators_html += "" + operators_html += "" operators_html += f"" operators_html += "" # The below script generates the URL for the class definition by extracting the selected doc version from @@ -124,7 +123,7 @@ def run(self): "
#Operator nameDeprecatedIs deprecated?Import path
{index}{operator[0]} Yes Old Path:\n
from {operator[2]} import {operator[0]}
\n New Path: \n
{operator[3]}
No
from {operator[2]} import {operator[0]}
" "" "" - "" + "" "" ) for index, sensor in enumerate(sensors, start=1): @@ -133,10 +132,10 @@ def run(self): f"" f"" f"" ) if sensor[1]: - sensors_html += "" + sensors_html += "" sensors_html += f"" else: - sensors_html += "" + sensors_html += "" sensors_html += f"" sensors_html += "" sensors_html += (
#Sensor nameDeprecatedIs deprecated?Import path
{index}{sensor[0]} Yes Old Path:\n
from {sensor[2]} import {sensor[0]}
\n New Path: \n
{sensor[3]}
No
from {sensor[2]} import {sensor[0]}